Method: Rolify::Role#has_strict_role?

Defined in:
lib/rolify/role.rb

#has_strict_role?(role_name, resource) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/rolify/role.rb', line 43

def has_strict_role?(role_name, resource)
  self.class.adapter.where_strict(self.roles, name: role_name, resource: resource).any?
end