José Valim
cf6ccf0ebd
Merge pull request #3854 from exviva/validates_associated_marked_for_destruction
...
Do not validate associated records marked for destruction
2011-12-04 15:57:13 -08:00
Olek Janiszewski
a8134aceb3
Do not validate associated records marked for destruction
...
The main reason for this change is to fix a bug where
`validates_associated` would prevent `accepts_nested_attributes_for`
with `allow_destroy: true` from destroying invalid associated records.
2011-12-05 00:19:21 +01:00
Jon Leighton
4ded0dd2de
Merge pull request #3851 from ebeigarts/fix_sequence_name
...
Fix sequence name with abstract classes.
2011-12-04 15:19:17 -08:00
Xavier Noria
4e74bd194b
moves some auto explain logic to the subscriber [José Valim & Xavier Noria]
2011-12-04 13:53:26 -08:00
Xavier Noria
7f3ce35e19
simplifies ActiveRecord::ExplainSubscriber [José Valim & Xavier Noria]
2011-12-04 13:27:03 -08:00
Xavier Noria
d59bfeb119
Merge branch 'explain'
2011-12-04 11:55:53 -08:00
Xavier Noria
cfeac38e2b
implements a much faster auto EXPLAIN, closes #3843 [José Valim & Xavier Noria]
...
This commit vastly reduces the impact of auto
explain logging when enabled, while keeping
a negligible cost when disabled.
The first implementation was based on the idea
of subscribing to "sql.active_record" when
needed, and unsubscribing once done. This is
the idea behind AR::Relation#explain. Subscribe,
collect, unsubscribe.
But with the current implementation of notifications
unsubscribing is costly, because it wipes an internal
cache and that puts a penalty on the next event.
So we are switching to an approach where a long-running
subscriber is listening. Instead of collecting the
queries with a closure in a dedicated subscriber, now
we setup a thread local.
If the feature is disabled by setting the threshold
to nil, the subscriber will call a method that does
nothing. That's totally cheap.
2011-12-04 11:52:12 -08:00
José Valim
0ec0c9abe1
Merge pull request #3853 from nashby/form_for_as_option
...
form_for with :as option uses "action_as" as css class and id
2011-12-04 11:25:12 -08:00
Aaron Patterson
c24928c3ad
Merge pull request #3845 from sumbach/test-return-value-from-require
...
Add tests for the return value of require
2011-12-04 11:22:09 -08:00
Vasiliy Ermolovich
e29773f885
form_for with +:as+ option uses "action_as" as css class and id
2011-12-04 22:12:24 +03:00
Vijay Dev
3134b467f0
Merge branch 'master' of github.com:lifo/docrails
2011-12-04 23:56:46 +05:30
Edgars Beigarts
82ae5c40ea
Fix sequence name with abstract classes.
2011-12-04 20:10:14 +02:00
José Valim
91a3e92cc2
Merge pull request #3850 from carlosantoniodasilva/readonly-attributes
...
Refactor readonly attributes conditional
2011-12-04 04:46:59 -08:00
Carlos Antonio da Silva
4e836e4de9
Refactor readonly attributes conditional
2011-12-04 09:21:34 -02:00
Vijay Dev
69341d3686
copy edits in the migrations guide
2011-12-04 16:29:11 +05:30
Xavier Noria
5dfdc69ef9
Merge pull request #3848 from arunagw/sqlite3_bump
...
SQlite3 Bump
2011-12-04 01:56:50 -08:00
Arun Agrawal
ac4763f5c0
SQlite3 Bump
2011-12-04 10:27:44 +05:30
Jason Noble
95213ac477
Be explicit about where to add/remove stuff to the migration
2011-12-03 19:31:45 -07:00
Jason Noble
b6d7ce9f23
Fix missing /ruby block
2011-12-03 19:31:45 -07:00
Jason Noble
718d0ea985
Be explicit of where the constraints are.
2011-12-03 19:31:45 -07:00
Jason Noble
914b85f124
Improve readability
2011-12-03 19:31:44 -07:00
Jason Noble
452b624e1e
Be more friendly than "shut up"
2011-12-03 19:31:44 -07:00
Jason Noble
6589359ed1
A table format makes this section easier to read
2011-12-03 19:31:44 -07:00
Jason Noble
e9b3b9e5d8
This section is more about changing the output of running migrations
2011-12-03 19:31:44 -07:00
Jason Noble
d1ef1b2220
Improve readability
2011-12-03 19:31:44 -07:00
Jason Noble
90f18cc85e
Readability improvements
2011-12-03 19:31:44 -07:00
Jason Noble
82ba3a79bf
Move this into a section so that "Resetting the database" will show up in TOC
2011-12-03 19:31:44 -07:00
Jason Noble
d8c8bf5f05
Change wording to be more explicit on what migrating with a version does
2011-12-03 19:31:44 -07:00
Jason Noble
93d9845c30
Migrations can also run the "change" method
2011-12-03 19:31:44 -07:00
Jason Noble
4130fe3a5b
Reword section to make it more readable.
2011-12-03 19:31:44 -07:00
Jason Noble
f41d099720
We're using methods, not writing them
2011-12-03 19:31:44 -07:00
Jason Noble
aca34b8e51
Change wording to be more understandable
2011-12-03 19:31:44 -07:00
Jason Noble
f7740f20f2
We're using the method, not writing it
2011-12-03 19:31:43 -07:00
Jason Noble
eedb863674
Change The other... to Another...
2011-12-03 19:31:43 -07:00
Jason Noble
74807383aa
Reword confusing section
2011-12-03 19:31:43 -07:00
Jason Noble
a41295fdaa
Correct grammatical errors
2011-12-03 19:31:43 -07:00
Jason Noble
bc6d1ebc66
It's more that Rails needs to know how to recreate the columns
2011-12-03 19:31:43 -07:00
Jason Noble
ec2727281c
Added "also" to read better
2011-12-03 19:31:43 -07:00
Jason Noble
b3f8cbd9a8
Explain the t.timestamps method a little better
2011-12-03 19:31:43 -07:00
Jason Noble
1f765a2f72
Re-word confusing section
2011-12-03 19:31:43 -07:00
Jason Noble
c8f8ecfd38
Rollback is used elsewhere in the tutorial
2011-12-03 19:31:43 -07:00
Jason Noble
78f6672a43
Alphabetize fields to make reading easier
2011-12-03 19:31:43 -07:00
Jason Noble
f9cc3f0d8e
Improve wording, fix some formatting issues
2011-12-03 19:31:43 -07:00
Jason Noble
9d87fb8f68
Constrained to 80 chars per line
2011-12-03 19:31:43 -07:00
Ryan Bigg
d7c2fcd856
Update layouts and rendering guide javascript_include_tag to bring it in line with Rails 3.1
2011-12-04 08:49:55 +11:00
Jon Leighton
e9b6659c4c
Add missing require
2011-12-03 20:39:49 +00:00
Jon Leighton
3f23c049c2
Enable postgres on the CI ❤️ 🍺 ✨
2011-12-03 20:09:43 +00:00
Jon Leighton
51c2ef0b81
Avoid postgres 9.X syntax
2011-12-03 20:06:46 +00:00
Sam Umbach
cfc467f73e
Simplify load and require tests
...
- These tests don't use autoloading so there's no need to add anything to autoload_paths
2011-12-03 13:11:02 -05:00
Sam Umbach
2a9f063082
Test that require and load raise LoadError if file not found
2011-12-03 13:08:18 -05:00