Module: Rabarber::Core::Roleable

Included in:
Authorization, Helpers
Defined in:
lib/rabarber/core/roleable.rb

Instance Method Summary collapse

Instance Method Details

#roleableObject



8
9
10
# File 'lib/rabarber/core/roleable.rb', line 8

def roleable
  send(Rabarber::Configuration.instance.current_user_method) || NullRoleable.new
end

#roleable_roles(context: nil) ⇒ Object



12
13
14
# File 'lib/rabarber/core/roleable.rb', line 12

def roleable_roles(context: nil)
  roleable.roles(context:)
end