This commit is contained in:
11
app/models/first_run.rb
Normal file
11
app/models/first_run.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class FirstRun
|
||||
ACCOUNT_NAME = "Writebook"
|
||||
|
||||
def self.create!(user_params)
|
||||
account = Account.create!(name: ACCOUNT_NAME)
|
||||
|
||||
User.create!(user_params.merge(role: :administrator)).tap do |user|
|
||||
DemoContent.create_manual(user)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user