forked from fixin.me/fixin.me
Fix db:seed:export task
* replace variable names with Hash to avoid invalid Ruby identifiers * export all values as single-quoted to avoid string interpolation and treating BigDecimal numbers as Float * #truncate table instead of #delete_all to avoid foreing_key constraints errors Closes #56
This commit is contained in:
@@ -20,4 +20,6 @@ end
|
||||
# Formulas will be deleted as dependent on Quantities
|
||||
#[Source, Quantity, Unit].each { |model| model.defaults.delete_all }
|
||||
|
||||
require 'seeds/units.rb'
|
||||
# To clear contents of the table, use #truncate instead of #delete_all. This
|
||||
# avoids foreign_key constraints errors.
|
||||
require_relative 'seeds/units.rb'
|
||||
|
||||
Reference in New Issue
Block a user