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 |
# File 'app/models/locomotive/extensions/site/first_installation.rb', line 7 def create_first_one(attributes) site = self.new(attributes) site.memberships.build :account => Account.first, :role => 'admin' site.save site end |