diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-22 13:24:48 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-22 13:24:48 -0200 |
commit | 2a29c7d3b7d4cb5779ffb3d728f1e6e91d677067 (patch) | |
tree | a3a25c9d143fbd96ab7db4e793938d2003154464 /activerecord | |
parent | 66aa5e252153ed2a00e7f1e8faa33f6eaa0bac8e (diff) | |
download | rails-2a29c7d3b7d4cb5779ffb3d728f1e6e91d677067.tar.gz rails-2a29c7d3b7d4cb5779ffb3d728f1e6e91d677067.tar.bz2 rails-2a29c7d3b7d4cb5779ffb3d728f1e6e91d677067.zip |
Make CollectionProxy#reset return self
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 08bc409816..eba688866c 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -1005,7 +1005,7 @@ module ActiveRecord self end - # Unloads the association + # Unloads the association. Returns +self+. # # class Person < ActiveRecord::Base # has_many :pets @@ -1024,6 +1024,7 @@ module ActiveRecord def reset proxy_association.reset proxy_association.reset_scope + self end end end |