Sha256: 74d1b62066f2bf53d74d625ed47526cb8fd1b28a19673fe3f424e79941c2706e
Contents?: true
Size: 602 Bytes
Versions: 4
Compression:
Stored size: 602 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.id), :notice => I18n.t("iugu.notices.roles_changed") end end
Version data entries
4 entries across 4 versions & 1 rubygems