1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove redundant uniq

This commit is contained in:
Frederick Cheung 2008-11-11 11:22:13 +01:00 committed by Michael Koziarski
parent cbb38bbdba
commit 78a18392e1

View file

@ -312,7 +312,7 @@ module ActiveRecord
table_name = klass.quoted_table_name table_name = klass.quoted_table_name
primary_key = klass.primary_key primary_key = klass.primary_key
column_type = klass.columns.detect{|c| c.name == primary_key}.type 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 if column_type == :integer
id.to_i id.to_i
elsif column_type == :float elsif column_type == :float