Class: Locomotive::AccountsController

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

Instance Method Summary collapse

Instance Method Details

#createObject


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

def create
  authorize Membership
  @account = Account.create()
  service.create(@account) if @account.errors.empty?
  respond_with @account, location: edit_current_site_path(current_site)
end

#newObject


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

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