Class: Locomotive::Api::MyAccountController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Locomotive::Api::MyAccountController
show all
- Defined in:
- app/controllers/locomotive/api/my_account_controller.rb
Instance Method Summary
collapse
#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks
Instance Method Details
#create ⇒ Object
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
|
#show ⇒ Object
11
12
13
|
# File 'app/controllers/locomotive/api/my_account_controller.rb', line 11
def show
respond_with(current_locomotive_account)
end
|
#update ⇒ Object
22
23
24
25
26
|
# File 'app/controllers/locomotive/api/my_account_controller.rb', line 22
def update
current_locomotive_account.from_presenter(params[:account])
current_locomotive_account.save
respond_with(current_locomotive_account)
end
|