Sha256: 11cf58f02111b7bc2774581b3dd054d030a6705d61943f3c61790635a09948de
Contents?: true
Size: 368 Bytes
Versions: 7
Compression:
Stored size: 368 Bytes
Contents
class UsersController < ApplicationController load_and_authorize_resource def index @users = User.all end def roles end def update if !params[:user] roles = [] else roles = params[:user][:role_ids] end flash[:notice]=params[:id] @user.update_attributes({:role_ids =>roles}) redirect_to roles_path end end
Version data entries
7 entries across 7 versions & 1 rubygems