2011-10-30 23:02:41 +00:00
|
|
|
module Locomotive
|
2011-07-06 18:48:04 +00:00
|
|
|
class MyAccountController < BaseController
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
sections 'settings', 'account'
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-13 20:01:40 +00:00
|
|
|
respond_to :json, :only => :update
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2011-11-28 14:40:25 +00:00
|
|
|
helper 'Locomotive::Accounts'
|
|
|
|
|
2011-06-26 23:02:48 +00:00
|
|
|
skip_load_and_authorize_resource
|
|
|
|
|
2011-11-20 10:59:12 +00:00
|
|
|
def edit
|
2011-11-28 14:40:25 +00:00
|
|
|
@account = current_locomotive_account
|
|
|
|
respond_with @account
|
2011-11-20 10:59:12 +00:00
|
|
|
end
|
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
def update
|
2011-11-04 15:55:51 +00:00
|
|
|
@account = current_locomotive_account
|
2011-11-28 14:40:25 +00:00
|
|
|
@account.update_attributes(params[:account])
|
|
|
|
respond_with @account, edit_my_account_url
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
end
|