Class: Locomotive::AccountsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/locomotive/accounts_controller.rb

Instance Method Summary collapse

Methods included from Locomotive::ActionController::Ssl

#require_ssl

Methods included from Locomotive::ActionController::UrlHelpers

#current_site_public_url, #public_page_url, #switch_to_site_url

Methods included from Locomotive::ActionController::SectionHelpers

#sections

Methods included from Locomotive::ActionController::LocaleHelpers

#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks

Instance Method Details

#createObject



11
12
13
14
15
# File 'app/controllers/locomotive/accounts_controller.rb', line 11

def create
  @account = Account.create(params[:account])
  current_site.memberships.create(account: @account) if @account.errors.empty?
  respond_with @account, location: edit_current_site_path
end

#newObject



6
7
8
9
# File 'app/controllers/locomotive/accounts_controller.rb', line 6

def new
  @account = Account.new(email: params[:email])
  respond_with @account
end