Permalink
Browse files

Make CollectionProxy#reset return self

  • Loading branch information...
1 parent 66aa5e2 commit 2a29c7d3b7d4cb5779ffb3d728f1e6e91d677067 @rafaelfranca rafaelfranca committed Jan 22, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/lib/active_record/associations/collection_proxy.rb
@@ -1005,7 +1005,7 @@ def reload
self
end
- # Unloads the association
+ # Unloads the association. Returns +self+.
#
# class Person < ActiveRecord::Base
# has_many :pets
@@ -1024,6 +1024,7 @@ def reload
def reset
proxy_association.reset
proxy_association.reset_scope
+ self
end
end
end

0 comments on commit 2a29c7d

Please sign in to comment.