- 29 11月, 2012 1 次提交
-
-
由 Jason Rush 提交于
Allows you to do BaseClass.new(:type => "SubClass") as well as parent.children.build(:type => "SubClass") or parent.build_child to initialize an STI subclass. Ensures that the class name is a valid class and that it is in the ancestors of the super class that the association is expecting.
-
- 17 9月, 2012 1 次提交
-
-
由 Guillermo Iguaran 提交于
-
- 04 9月, 2012 1 次提交
-
-
由 Yves Senn 提交于
All tests with a custom inheritance_column use the `Vegtable` model. The field ruby_type on the Company models is no longer needed
-
- 11 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
It's not really a good idea to have this as a global config option. We should allow people to specify the behaviour per association. There will now be two new values: * :dependent => :restrict_with_exception implements the current behaviour of :restrict. :restrict itself is deprecated in favour of :restrict_with_exception. * :dependent => :restrict_with_error implements the new behaviour - it adds an error to the owner if there are dependent records present See #4727 for the original discussion of this.
-
- 02 8月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This reverts commit 3803fcce. Conflicts: activerecord/CHANGELOG.md It will be deprecated only in 4.0, and removed properly in 4.1.
-
- 21 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 20 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 03 5月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Change CollectionProxy#method_missing to use scoped.public_send, to avoid a problem described in issue #2508 when trying to use class methods with names like "open", that clash with private kernel methods. Also changed the dynamic matcher instantiator to send straight to scoped, to avoid another roundtrip to method_missing.
-
- 01 2月, 2012 1 次提交
-
-
由 gregolsen 提交于
-
- 31 1月, 2012 1 次提交
-
-
由 gregolsen 提交于
-
- 17 1月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
See the CHANGELOG for details. Fixes #950.
-
- 30 11月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 04 11月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
This is to avoid confusing newbies, and to be consistent with the fact that other options like :foreign_key already allow a symbol or a string.
-
- 13 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 14 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add interpolation of association conditions back in, in the form of proc { ... } rather than instance_eval-ing strings
-
- 17 1月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 08 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Construct an actual ActiveRecord::Relation object for the association scope, rather than a hash which is passed to apply_finder_options. This allows more flexibility in how the scope is created, for example because scope.where(a, b) and scope.where(a).where(b) mean different things.
-
- 04 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message!
-
- 01 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Verify that when has_many associated objects are destroyed via :dependent => :destroy, when the parent is destroyed, the callbacks are run
-
- 31 10月, 2010 1 次提交
-
-
由 Denis Odorcic 提交于
Convert :primary_key in association to a string before comparing to column names, so that for example :primary_key => :another_pk works as well [#5605 state:resolved]
-
- 28 3月, 2010 1 次提交
-
-
由 Rizwan Reza 提交于
-
- 09 3月, 2010 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 19 1月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
Simplify calculation scope building. Remove :order from associations as it is troublesome w/ calculation methods using postgresql.
-
- 10 11月, 2009 1 次提交
-
-
由 Matt Jones 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
- 28 9月, 2009 1 次提交
-
-
由 Luciano G Panaro 提交于
Make has_one with :conditions hash scope build or creation of the associated object with those conditions Signed-off-by: NMichael Koziarski <michael@koziarski.com> [#3088 state:committed]
-
- 12 9月, 2009 2 次提交
-
-
由 Graeme Porteous 提交于
Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
由 Eloy Duran 提交于
Explicitely setting `autosave => false' should override new_record autosaving. [#2214 state:resolved] Original author is Jacob.
-
- 08 9月, 2009 1 次提交
-
-
由 José Valim 提交于
Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed. Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 10 8月, 2009 1 次提交
-
-
由 railsbob 提交于
[#2934 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 07 8月, 2009 1 次提交
-
-
由 Raimonds Simanovskis 提交于
Oracle stores '' string as NULL Oracle cannot have identifiers larger than 30 characters added missing fixtures to test setup method
-
- 16 7月, 2009 1 次提交
-
-
由 Szymon Nowak 提交于
[#765 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 01 7月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
Revert "Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question.
-
- 23 6月, 2009 1 次提交
-
-
Revert "Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e. The tests do not pass for postgresql.
-
- 22 6月, 2009 1 次提交
-
-
由 Patrick Joyce 提交于
Generate proper :counter_sql from :finder_sql when there is a newline character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 21 4月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
-
- 22 3月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
Deprecate Model#validate/validate_on_create/validate_on_update. Use Model.validate :method and likewise
-
- 09 3月, 2009 1 次提交
-
-
由 Jan De Poorter 提交于
Signed-off-by: NDavid Heinemeier Hansson <david@loudthinking.com>
-
- 07 3月, 2009 1 次提交
-
-
由 Dimitri Krassovski 提交于
Ensure replacing has_one associations respects the supplied :dependent option. [#1305 state:resolved] Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-