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