Add support for gangs #25

Merged
bilal.catic merged 7 commits from add-support-for-gangs into master 2020-10-08 08:25:01 +02:00
Showing only changes of commit 8cb44e4b16 - Show all commits

View File

@@ -2,7 +2,7 @@ class AddInitialGangAndConnectToHomies < ActiveRecord::Migration[5.2]
def up
# execute "INSERT INTO gangs SELECT 'name' WHERE NOT EXISTS (SELECT * FROM gangs)"
if Gang.count.zero?
Gang.create.save
Gang.create(name: 'Default').save
end
gang = Gang.first