Permalink
Browse files

Remove redundant uniq

  • Loading branch information...
1 parent cbb38bb commit 78a18392e15c3de1c70b44e285d1742687624dd1 @fcheung fcheung committed with NZKoz Nov 11, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/association_preload.rb
@@ -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

0 comments on commit 78a1839

Please sign in to comment.