diff options
Diffstat (limited to 'db/seeds.rb')
-rw-r--r-- | db/seeds.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/seeds.rb b/db/seeds.rb index 637a355..2008d89 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -14,3 +14,13 @@ load_data_file("data/skills.yml").map do |gid, hash| skill = Skill.find_or_create_by(gid: gid) skill.update(hash) end + +load_data_file("data/items.yml").map do |gid, hash| + item = Item.find_or_create_by(gid: gid) + item.name = hash[:name] + item.description = hash[:description] + item.equip_slot = hash[:equip_slot]&.to_sym + item.usable = hash[:usable] || false + item.whatnot = hash[:whatnot] + item.save +end |