Module: Locomotive::Extensions::Site::FirstInstallation
- Included in:
- Site
- Defined in:
- app/models/locomotive/extensions/site/first_installation.rb
Instance Method Summary collapse
-
#create_first_one(attributes) ⇒ Object
only called during the installation workflow, just after the admin account has been created.
Instance Method Details
#create_first_one(attributes) ⇒ Object
only called during the installation workflow, just after the admin account has been created
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/models/locomotive/extensions/site/first_installation.rb', line 7 def create_first_one(attributes) site = self.new(attributes) account = Account.first site.memberships.build account: account, role: 'admin' site.save account.locale = site.default_locale account.save site end |