Class: Locomotive::Api::MyAccountController

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

Instance Method Summary collapse

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



15
16
17
18
19
20
# File 'app/controllers/locomotive/api/my_account_controller.rb', line 15

def create
  @account = Locomotive::Account.new
  @account.from_presenter(params[:account])
  @account.save
  respond_with(@account)
end

#showObject



11
12
13
# File 'app/controllers/locomotive/api/my_account_controller.rb', line 11

def show
  respond_with()
end

#updateObject



22
23
24
25
26
# File 'app/controllers/locomotive/api/my_account_controller.rb', line 22

def update
  .from_presenter(params[:account])
  .save
  respond_with()
end