Class: Iugu::AccountRolesController

Inherits:
SettingsController
  • Object
show all
Defined in:
app/controllers/iugu/account_roles_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



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..find_by_user_id(params[:user_id])
end

#updateObject



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..find_by_user_id(params[:user_id])
  @account_user.set_roles(params[:roles])
  redirect_to (@account), :notice => I18n.t("iugu.notices.roles_changed")
end