- 29 1月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
This is an alternative of #27714. If `has_one :through` association has set `nil`, `through_record` is destroyed but still remain loaded target in `through_proxy` until `reload` or `reset` explicitly. If `through_proxy` is not reset (remain destroyed (frozen) target), setting new record causes `RuntimeError: Can't modify frozen hash`. To prevent `RuntimeError`, should reload `through_record` that has been destroyed in `create_through_record`.
-
- 23 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`send` is unnecessary.
-
- 04 1月, 2013 1 次提交
-
-
- 22 2月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Associations - where possible, call attributes methods rather than directly accessing the instance variables
-
- 18 2月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
Split AssociationProxy into an Association class (and subclasses) which manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
-
由 Jon Leighton 提交于
-
- 30 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 17 1月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 12 1月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 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!
-
- 27 12月, 2010 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Use the through association proxy for operations on the through record, so that those operations are automatically scoped and therefore construct_join_attributes does not need to use construct_owner_attributes.
-
- 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.
-
- 16 12月, 2010 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 28 11月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 09 11月, 2010 1 次提交
-
-
由 David Chelimsky 提交于
- persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 31 10月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
-
- 30 10月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
-
- 18 10月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
Refactoring: replace the mix of variables like @finder_sql, @counter_sql, etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly.
-
- 16 10月, 2010 1 次提交
-
-
由 Jon Leighton 提交于
-
- 17 6月, 2010 1 次提交
-
-
由 Rizwan Reza 提交于
-
- 10 8月, 2009 1 次提交
-
-
由 Tristan Dunn 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 13 6月, 2009 1 次提交
-
-
由 Adam Milligan 提交于
[#1642 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 17 5月, 2009 1 次提交
-
-
由 Daniel Guettler 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 16 11月, 2008 1 次提交
-
-
由 Matt Jones 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
- 27 8月, 2008 1 次提交
-
-
由 pivotal 提交于
* Set the association target on assignment; * Reset target to nil on reset, rather than empty array. Signed-off-by: NMichael Koziarski <michael@koziarski.com> [#895 state:committed]
-
- 06 4月, 2008 1 次提交
-
-
由 Pratik Naik 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-
- 22 3月, 2008 1 次提交
-
-
由 Rick Olson 提交于
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-