No reason to pull :validate out of the options hash, and it's obfuscatory - remove.

This commit is contained in:
Ben Woosley 2010-11-16 23:55:19 -08:00 committed by Zach Dennis
parent 18012bbbca
commit 899af1e412

View file

@ -188,8 +188,6 @@ class ActiveRecord::Base
array_of_attributes.each { |a| a << nil } array_of_attributes.each { |a| a << nil }
end end
is_validating = options.delete( :validate )
# dup the passed in array so we don't modify it unintentionally # dup the passed in array so we don't modify it unintentionally
array_of_attributes = array_of_attributes.dup array_of_attributes = array_of_attributes.dup
@ -198,7 +196,7 @@ class ActiveRecord::Base
add_special_rails_stamps column_names, array_of_attributes, options add_special_rails_stamps column_names, array_of_attributes, options
end end
return_obj = if is_validating return_obj = if options[:validate]
import_with_validations( column_names, array_of_attributes, options ) import_with_validations( column_names, array_of_attributes, options )
else else
num_inserts = import_without_validations_or_callbacks( column_names, array_of_attributes, options ) num_inserts = import_without_validations_or_callbacks( column_names, array_of_attributes, options )