Sha256: 5bc50edc7f976b3faa607e31c8081ed4507f59a8704a70f9bfdd65bf687805b2

Contents?: true

Size: 599 Bytes

Versions: 35

Compression:

Stored size: 599 Bytes

Contents

class Iugu::AccountRolesController < Iugu::SettingsController

  before_filter(:only => [:edit, :update]) { |c| c.must_be [:owner, :admin], :id }

  def edit
    @account = current_user.accounts.find(params[:id])
    @account_user = @account.account_users.find_by_user_id(params[:user_id])
  end

  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
  
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
iugusdk-1.0.11 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.10 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.9 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.8 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.7 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.6 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.5 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.4 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.3 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.2 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.1 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.32 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.31 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.30 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.29 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.28 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.27 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.26 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.25 app/controllers/iugu/account_roles_controller.rb
iugusdk-1.0.0.alpha.24 app/controllers/iugu/account_roles_controller.rb