Sha256: c385b81e91f09b1caac1b976ba6530a873894d95fed504ef5f2335d1657fd694

Contents?: true

Size: 372 Bytes

Versions: 5

Compression:

Stored size: 372 Bytes

Contents

class MainController < ApplicationController

  def index
    @users = RefManyUser.all
    
    first_user = @users.first

    # puts "Clearing roles of first user"
    first_user.clear_roles!

    # puts "Adding role admin to first user"
    first_user.roles << :admin    
        
    # puts "#{first_user.name} has role :admin? #{first_user.has_role? :admin}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
troles-0.6.1 spec/dummy/app/controllers/main_controller.rb
troles-0.6.0 spec/dummy/app/controllers/main_controller.rb
troles-0.5.2 spec/dummy/app/controllers/main_controller.rb
troles-0.5.1 spec/dummy/app/controllers/main_controller.rb
troles-0.5.0 spec/dummy/app/controllers/main_controller.rb