- 13 12月, 2013 8 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
calling replace_keys could possibly do a nil check twice, this commit reduces it to once.
-
由 Aaron Patterson 提交于
methods that call set_inverse_instance with a record will not have to pay the cost of a nil check on every call
-
- 02 9月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 21 3月, 2013 1 次提交
-
-
由 wangjohn 提交于
-
- 25 2月, 2013 1 次提交
-
-
由 libin 提交于
-
- 09 1月, 2013 1 次提交
-
-
由 Angelo Capilleri 提交于
-
- 11 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 13 4月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 12 4月, 2012 1 次提交
-
-
由 kennyj 提交于
* Remove unused association_class method. * Remove a unnecessary assignment. * Move @updated to BelongsToAssociation that only reference this instance variable. * Reset @stale_state at the reset method. I think this place is right place.
-
- 26 9月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Closes #3104.
-
- 06 9月, 2011 1 次提交
-
-
由 Georg Friedrich 提交于
-
- 12 7月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 22 2月, 2011 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Delegate Association#options to the reflection, and replace 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Associations - where possible, call attributes methods rather than directly accessing the instance variables
-
- 30 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 17 1月, 2011 6 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 15 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 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 4 次提交
-
-
由 Jon Leighton 提交于
When preloading a belongs_to, the target should still be set (to nil) if there is no foreign key present. And the loaded flag should be set on the association proxy. This then allows us to remove the foreign_key_present? check from BelongsToAssociation#find_target. Also added a test for the same thing on polymorphic associations.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 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 3 次提交
-
-
由 Jon Leighton 提交于
Rename AssociationReflection#primary_key_name to foreign_key, since the options key which it relates to is :foreign_key
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 27 12月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
-
- 24 12月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
If a has_many goes :through a belongs_to, and the foreign key of the belongs_to changes, then the has_many should be considered stale.
-