Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove redundant uniq

  • Loading branch information...
commit 78a18392e15c3de1c70b44e285d1742687624dd1 1 parent cbb38bb
Frederick Cheung fcheung authored NZKoz committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/association_preload.rb
2  activerecord/lib/active_record/association_preload.rb
View
@@ -312,7 +312,7 @@ def preload_belongs_to_association(records, reflection, preload_options={})
table_name = klass.quoted_table_name
primary_key = klass.primary_key
column_type = klass.columns.detect{|c| c.name == primary_key}.type
- ids = id_map.keys.uniq.map do |id|
+ ids = id_map.keys.map do |id|
if column_type == :integer
id.to_i
elsif column_type == :float
Please sign in to comment.
Something went wrong with that request. Please try again.