Files
old-holivud2/db/seeds.rb
2020-05-31 22:38:19 +02:00

28 lines
817 B
Ruby

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Character.create(name: 'Luke', movie: movies.first)i
ApplicableMedium.destroy_all
[:other, :all].each do |label|
ApplicableMedium.create(label: label.to_s.humanize)
end
Territory.destroy_all
[:other, :worldwide].each do |label|
Territory.create(label: label.to_s.humanize)
end
Term.destroy_all
[:other, :in_perpetuity].each do |label|
Term.create(label: label.to_s.humanize)
end
Restriction.destroy_all
[:other, :none].each do |label|
Restriction.create(label: label.to_s.humanize)
end