Method: Rolify::Role#has_any_role?
- Defined in:
- lib/rolify/role.rb
#has_any_role?(*args) ⇒ Boolean
69 70 71 72 73 74 75 |
# File 'lib/rolify/role.rb', line 69 def has_any_role?(*args) if new_record? args.any? { |r| self.has_role?(r) } else self.class.adapter.where(self.roles, *args).size > 0 end end |