diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 06b1276860..14f752abe4 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -148,7 +148,8 @@ module ActiveRecord :include => @reflection.options[:include] || @reflection.source_reflection.options[:include] ) - @reflection.options[:uniq] ? records.to_set.to_a : records + records.uniq! if @reflection.options[:uniq] + records end # Construct attributes for associate pointing to owner. |