- 19 5月, 2012 2 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
- 12 5月, 2012 5 次提交
-
-
由 Jon Leighton 提交于
Makes it consistent with Relation. Can't see a use for this.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This helps bring the interfaces of CollectionProxy and Relation closer together, and reduces the delegation backflips we need to perform. For example, first_or_create is defined thus: class ActiveRecord::Relation def first_or_create(...) first || create(...) end end If CollectionProxy < Relation, then post.comments.first_or_create will hit the association's #create method which will actually add the new record to the association, just as post.comments.create would. With the previous delegation, post.comments.first_or_create expands to post.comments.scoped.first_or_create, where post.comments.scoped has no knowledge of the association.
-
- 04 5月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 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.
-
- 27 4月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 18 4月, 2012 1 次提交
-
-
由 Jorge Bejar 提交于
if they are not defined or delegated. In this way, we have a performance boost invoking some array methods which are not defined in CollectionAssociation.
-
- 20 1月, 2012 1 次提交
-
-
由 Jonathan del Strother 提交于
-
- 06 1月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 09 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 30 11月, 2011 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 26 9月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
CollectionProxy#replace should change the DB records rather than just mutating the array. Fixes #3020.
-
- 14 8月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add a proxy_association method to association proxies, which can be called by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
-
- 27 7月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add a proxy_association method to association proxies, which can be called by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
-
- 08 7月, 2011 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 01 7月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 08 6月, 2011 1 次提交
-
-
由 Santiago Pastorino 提交于
-
- 01 6月, 2011 1 次提交
-
-
由 Josh Kalderimis 提交于
added an alias for new to build to the AR collection proxy, this corrects an issue where the collection proxies were not consistent
-
- 25 5月, 2011 1 次提交
-
-
由 Josh Kalderimis 提交于
-
- 20 5月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Implement proxy_owner, proxy_target and proxy_reflection methods on CollectionProxy with deprecations. Fixes #1148.
-
- 02 5月, 2011 1 次提交
-
-
由 Nick Howard 提交于
- adds tests for find_or_create_by and find_or_initialize_by on has_many associations - changes the behavior of ActiveRecord::Associations::CollectionProxy#method_missing to differ to ActiveRecord::FinderMethods#find_or_instantiator_by_attributes for arg processing and saving so find_or_create_by's api on associations will be consistent w/ the api for model classes.
-
- 13 4月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Removing the scope-caching which happens on association proxies, because the query is already cached by the query cacher. For formalised proof see http://www.youtube.com/watch?v=wDefXLb-FDs
-
- 18 2月, 2011 1 次提交
-
-
由 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.
-