Sha256: d14e4d401f50d6c1709249c15343c235d7f05457229b3f9158bc886157a44988
Contents?: true
Size: 712 Bytes
Versions: 18
Compression:
Stored size: 712 Bytes
Contents
module Locomotive class MyAccountController < BaseController sections 'settings', 'account' respond_to :json, only: [:update, :regenerate_api_key] helper 'Locomotive::Accounts' skip_load_and_authorize_resource def edit @account = current_locomotive_account respond_with @account end def update @account = current_locomotive_account @account.update_attributes(params[:account]) respond_with @account, location: edit_my_account_path end def regenerate_api_key @account = current_locomotive_account @account.regenerate_api_key! respond_with({ api_key: @account.api_key }, location: edit_my_account_path) end end end
Version data entries
18 entries across 18 versions & 1 rubygems