aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/collection_proxy.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* add :call-seq: to +first+ and +last+ CollectionProxy methodsFrancesco Rodriguez2012-05-221-0/+6
|
* add CollectionProxy#create! documentationFrancesco Rodriguez2012-05-221-0/+22
|
* add CollectionProxy#create documentationFrancesco Rodriguez2012-05-221-0/+33
|
* add more examples to CollectionProxy#findFrancesco Rodriguez2012-05-221-0/+9
|
* adding :call-seq: to CollectionProxy methodsFrancesco Rodriguez2012-05-221-0/+39
|
* add CollectionProxy#build documentationFrancesco Rodriguez2012-05-221-0/+31
|
* remove repeated documentation in CollectionProxy#clearFrancesco Rodriguez2012-05-221-24/+2
|
* update CollectionProxy#clear documentationFrancesco Rodriguez2012-05-211-3/+2
|
* update CollectionProxy#delete_all documentationFrancesco Rodriguez2012-05-211-2/+29
|
* add CollectionProxy#delete_all documentationFrancesco Rodriguez2012-05-211-0/+65
|
* fix CollectionProxy documentation markupFrancesco Rodriguez2012-05-211-8/+8
|
* add CollectionProxy#reload documentationFrancesco Rodriguez2012-05-211-0/+18
|
* improve CollectionProxy#destroy documentationFrancesco Rodriguez2012-05-211-5/+37
|
* add CollectionProxy#destroy documentationFrancesco Rodriguez2012-05-211-1/+42
|
* update CollectionProxy#destroy_all documentationFrancesco Rodriguez2012-05-201-1/+9
|
* add CollectionProxy#select documentationFrancesco Rodriguez2012-05-191-2/+55
|
* add CollectionProxy#find documentationFrancesco Rodriguez2012-05-191-0/+20
|
* copy edits [ci skip]Vijay Dev2012-05-191-17/+20
|
* add CollectionProxy#last documentationFrancesco Rodriguez2012-05-191-0/+27
|
* add CollectionProxy#first documentationFrancesco Rodriguez2012-05-191-0/+27
|
* improve CollectionProxy#concat documentationFrancesco Rodriguez2012-05-191-7/+18
|
* fix CollectionProxy#<< documentationFrancesco Rodriguez2012-05-191-1/+1
|
* add CollectionProxy#<< documentationFrancesco Rodriguez2012-05-191-0/+20
|
* add CollectionProxy#clear documentationFrancesco Rodriguez2012-05-191-0/+26
|
* add CollectionProxy#include? documentationFrancesco Rodriguez2012-05-181-0/+13
|
* move docs from CollectionAssociation to CollectionProxyFrancesco Rodriguez2012-05-181-1/+142
|
* Remove #=== quirkJon Leighton2012-05-111-6/+0
| | | | Makes it consistent with Relation. Can't see a use for this.
* this stuff can all be handled by RelationJon Leighton2012-05-111-38/+0
|
* extract deprecated codeJon Leighton2012-05-111-8/+1
|
* set_owner_attributes is covered by the scopingJon Leighton2012-05-111-4/+3
|
* CollectionProxy < RelationJon Leighton2012-05-111-15/+22
| | | | | | | | | | | | | | | | | | | | | 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.
* extract code from AR::BaseJon Leighton2012-05-041-1/+1
|
* clean up implementation of dynamic methods. use method compilation etc.Jon Leighton2012-05-041-3/+3
|
* Fix issue with private kernel methods and collection associations. Closes #2508Carlos Antonio da Silva2012-05-021-2/+2
| | | | | | | | 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.
* allow AssociationProxy#scoped to take options so that API is the same as ↵Jon Leighton2012-04-271-2/+6
| | | | Base#scoped
* Define array methods in ActiveRecord::Associations::CollectionProxyJorge Bejar2012-04-181-0/+13
| | | | | | 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.
* Don't instantiate two objects in collection proxy / find_or_instantiator_byJonathan del Strother2012-01-191-2/+1
|
* Remove Array.wrap calls in ActiveRecordRafael Mendonça França2012-01-061-1/+1
|
* Fix #3890. (Calling proxy_association in scope chain.)Jon Leighton2011-12-081-2/+8
|
* ActiveRecord::Relation#pluck methodBogdan Gusiev2011-11-301-1/+1
|
* CollectionProxy#replace should change the DB records rather than just ↵Jon Leighton2011-09-261-1/+1
| | | | mutating the array. Fixes #3020.
* Add a proxy_association method to association proxies, which can be called ↵Jon Leighton2011-07-271-6/+10
| | | | by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
* find(:first) => firstAkira Matsuda2011-07-081-1/+1
|
* match method signature of the superclassAaron Patterson2011-06-301-3/+3
|
* remove warning: assigned but unused variableSantiago Pastorino2011-06-081-1/+1
|
* added an alias for new to build to the AR collection proxy, this corrects an ↵Josh Kalderimis2011-06-011-8/+2
| | | | issue where the collection proxies were not consistent
* removed deprecated methods, and related tests, from ActiveRecordJosh Kalderimis2011-05-251-24/+0
|
* Implement proxy_owner, proxy_target and proxy_reflection methods on ↵Jon Leighton2011-05-191-0/+24
| | | | CollectionProxy with deprecations. Fixes #1148.
* Fix for lighthouse #6741Nick Howard2011-05-011-3/+6
| | | | | | | - 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.
* Removing the scope-caching which happens on association proxies, because the ↵Jon Leighton2011-04-121-2/+0
| | | | query is already cached by the query cacher. For formalised proof see http://www.youtube.com/watch?v=wDefXLb-FDs