diff options
author | kennyj <kennyj@gmail.com> | 2012-04-04 01:29:19 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-04-12 23:28:31 +0900 |
commit | 1e417d5cd2a014909b5b9b7b34110e3d0f2803b7 (patch) | |
tree | 0f1b36e6d013144a9f054eadbd5822b2f80b9776 /activerecord/lib/active_record/associations/collection_association.rb | |
parent | eda65f391edc1a4ba21fc51f076a442034095826 (diff) | |
download | rails-1e417d5cd2a014909b5b9b7b34110e3d0f2803b7.tar.gz rails-1e417d5cd2a014909b5b9b7b34110e3d0f2803b7.tar.bz2 rails-1e417d5cd2a014909b5b9b7b34110e3d0f2803b7.zip |
Some refactor for association.
* Remove unused association_class method.
* Remove a unnecessary assignment.
* Move @updated to BelongsToAssociation that only reference this instance variable.
* Reset @stale_state at the reset method. I think this place is right place.
Diffstat (limited to 'activerecord/lib/active_record/associations/collection_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index da4c311bce..14aa557b6c 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -71,7 +71,7 @@ module ActiveRecord end def reset - @loaded = false + super @target = [] end |