Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/seed_dump/dump_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def value_to_s(value)
when BigDecimal, IPAddr
value.to_s
when Date, Time, DateTime
value.to_s(:db)
value.to_fs(:db)
when Range
range_to_string(value)
when ->(v) { v.class.ancestors.map(&:to_s).include?('RGeo::Feature::Instance') }
Expand Down Expand Up @@ -70,7 +70,7 @@ def open_io(options)
def write_records_to_io(records, io, options)
options[:exclude] ||= [:id, :created_at, :updated_at]

method = options[:import] ? 'import' : 'create!'
method = options[:import] ? 'import_without_validations_or_callbacks' : 'create!'
io.write("#{model_for(records)}.#{method}(")
if options[:import]
io.write("[#{attribute_names(records, options).map {|name| name.to_sym.inspect}.join(', ')}], ")
Expand Down