diff options
author | David Gay <david@davidgay.org> | 2021-05-19 22:53:38 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-19 22:53:38 -0400 |
commit | 9415011b5fd192f1bafeaa9b6eacbb7921382a00 (patch) | |
tree | f25d9d633237cae5d7b73166e6612a9b53312714 /db/seeds.rb | |
parent | da678b22b5db05554b44234b341fabc9d83ff700 (diff) |
Chat
Diffstat (limited to 'db/seeds.rb')
-rw-r--r-- | db/seeds.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/db/seeds.rb b/db/seeds.rb index cf4caa6..7adf0fc 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -10,6 +10,11 @@ def load_data_file(path) YAML.load(File.read(path)).deep_transform_keys(&:to_sym) end +load_data_file("data/chat_rooms.yml").map do |gid, hash| + chat_room = ChatRoom.find_or_create_by(gid: gid) + chat_room.update(hash) +end + load_data_file("data/skills.yml").map do |gid, hash| skill = Skill.find_or_create_by(gid: gid) skill.update(hash) |