Method: Rolify::Finders#with_role

Defined in:
lib/rolify/finders.rb

#with_role(role_name, resource = nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rolify/finders.rb', line 3

def with_role(role_name, resource = nil)
  strict = self.strict_rolify && resource && resource != :any
  self.adapter.scope(
    self,
    { :name => role_name, :resource => resource },
    strict
  )
end