Class: AccountsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- AccountsController
- Defined in:
- app/controllers/accounts_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
12 13 14 |
# File 'app/controllers/accounts_controller.rb', line 12 def index end |
#switch ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/controllers/accounts_controller.rb', line 2 def switch account_uuid = params[:accounts][:account_uuid] user = User.find(:uuid => @current_user.uuid) user.primary_account_id = account_uuid user.save redirect_to :root end |