set default gang name
This commit is contained in:
@@ -2,7 +2,7 @@ class AddInitialGangAndConnectToHomies < ActiveRecord::Migration[5.2]
|
|||||||
def up
|
def up
|
||||||
# execute "INSERT INTO gangs SELECT 'name' WHERE NOT EXISTS (SELECT * FROM gangs)"
|
# execute "INSERT INTO gangs SELECT 'name' WHERE NOT EXISTS (SELECT * FROM gangs)"
|
||||||
if Gang.count.zero?
|
if Gang.count.zero?
|
||||||
Gang.create.save
|
Gang.create(name: 'Default').save
|
||||||
end
|
end
|
||||||
gang = Gang.first
|
gang = Gang.first
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user