aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-22 13:24:48 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-22 13:24:48 -0200
commit2a29c7d3b7d4cb5779ffb3d728f1e6e91d677067 (patch)
treea3a25c9d143fbd96ab7db4e793938d2003154464 /activerecord
parent66aa5e252153ed2a00e7f1e8faa33f6eaa0bac8e (diff)
downloadrails-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.rb3
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