Initial commit
This commit is contained in:
27
db/seeds.rb
Normal file
27
db/seeds.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user