Module: RoleStrategy::MongoMapper::RoleString::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#in_role(role_name) ⇒ Object



18
19
20
# File 'lib/roles_mongo_mapper/strategy/single/role_string.rb', line 18

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

#role_attributeObject



14
15
16
# File 'lib/roles_mongo_mapper/strategy/single/role_string.rb', line 14

def role_attribute
  strategy_class.roles_attribute_name.to_sym
end