diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-12 20:23:39 +0100 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-12 11:53:22 -0800 |
commit | fe43bbd8c71fabb4b612808c42461b2ba9655318 (patch) | |
tree | 55ea320a347a5fe7449777430282c618d935736e /activerecord/lib/active_record/associations/association_collection.rb | |
parent | 611744ebd33d04bb302bf12f627d36ca59041caf (diff) | |
download | rails-fe43bbd8c71fabb4b612808c42461b2ba9655318.tar.gz rails-fe43bbd8c71fabb4b612808c42461b2ba9655318.tar.bz2 rails-fe43bbd8c71fabb4b612808c42461b2ba9655318.zip |
keep AssociationProxy#to_a to avoid warning in Array(post.author), and delegate it to @target in association collections
[#4165 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 9487d16123..6eda70d0ce 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -101,6 +101,7 @@ module ActiveRecord Array(@target) end end + alias_method :to_a, :to_ary def reset reset_target! |