lib/seed-fu/seeder.rb in seed-fu-2.3.3 vs lib/seed-fu/seeder.rb in seed-fu-2.3.4
- old
+ new
@@ -69,10 +69,10 @@
record.assign_attributes(data, :without_protection => true)
# Rails 4 without rails/protected_attributes
else
record.assign_attributes(data)
end
- record.save(:validate => false) || raise(ActiveRecord::RecordNotSaved)
+ record.save(:validate => false) || raise(ActiveRecord::RecordNotSaved, 'Record not saved!')
record
end
def find_or_initialize_record(data)
@model_class.where(constraint_conditions(data)).first ||