Module: RoleStrategy::Mongoid::RoleString::ClassMethods

Defined in:
lib/roles_mongoid/strategy/single/role_string.rb

Instance Method Summary collapse

Instance Method Details

#in_role(role_name) ⇒ Object



16
17
18
# File 'lib/roles_mongoid/strategy/single/role_string.rb', line 16

def in_role(role_name) 
  where(role_attribute => role_name)
end

#role_attributeObject



12
13
14
# File 'lib/roles_mongoid/strategy/single/role_string.rb', line 12

def role_attribute
  strategy_class.roles_attribute_name.to_sym
end