Reinstate the deleting of the :validate option - not because it was causing trouble, but to be a bit paranoid (reverts 63d6faeccee14b6e571a25b6f51f340d5da325f5)
This commit is contained in:
parent
a3e9b4f040
commit
9727a04362
|
@ -158,6 +158,8 @@ class ActiveRecord::Base
|
|||
options = { :validate=>true, :timestamps=>true }
|
||||
options.merge!( args.pop ) if args.last.is_a? Hash
|
||||
|
||||
is_validating = options.delete( :validate )
|
||||
|
||||
# assume array of model objects
|
||||
if args.last.is_a?( Array ) and args.last.first.is_a? ActiveRecord::Base
|
||||
if args.length == 2
|
||||
|
@ -199,7 +201,7 @@ class ActiveRecord::Base
|
|||
add_special_rails_stamps column_names, array_of_attributes, options
|
||||
end
|
||||
|
||||
return_obj = if options[:validate]
|
||||
return_obj = if is_validating
|
||||
import_with_validations( column_names, array_of_attributes, options )
|
||||
else
|
||||
num_inserts = import_without_validations_or_callbacks( column_names, array_of_attributes, options )
|
||||
|
|
Loading…
Reference in a new issue