Class: Iugu::AccountRolesController
- Inherits:
-
SettingsController
- Object
- SettingsController
- Iugu::AccountRolesController
- Defined in:
- app/controllers/iugu/account_roles_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
5 6 7 8 |
# File 'app/controllers/iugu/account_roles_controller.rb', line 5 def edit @account = current_user.accounts.find(params[:id]) @account_user = @account.account_users.find_by_user_id(params[:user_id]) end |
#update ⇒ Object
10 11 12 13 14 15 |
# File 'app/controllers/iugu/account_roles_controller.rb', line 10 def update @account = current_user.accounts.find(params[:id]) @account_user = @account.account_users.find_by_user_id(params[:user_id]) @account_user.set_roles(params[:roles]) redirect_to account_users_index_path(@account), :notice => I18n.t("iugu.notices.roles_changed") end |