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

Version Path
squeezer-0.2.1 lib/generators/squeezer/templates/app/controllers/users_controller.rb
squeezer-0.2.0 lib/generators/squeezer/templates/app/controllers/users_controller.rb
squeezer-0.1.11 lib/generators/squeezer/templates/app/controllers/users_controller.rb
squeezer-0.1.7 lib/generators/squeezer/templates/app/controllers/users_controller.rb
squeezer-0.1.6 lib/generators/squeezer/templates/app/controllers/users_controller.rb
squeezer-0.1.5 lib/generators/squeezer/templates/app/controllers/users_controller.rb
squeezer-0.1.4 lib/generators/squeezer/templates/app/controllers/users_controller.rb