Class: Role

Inherits:
Object
  • Object
show all
Extended by:
RoleClass::ClassMethods
Includes:
DataMapper::Resource
Defined in:
lib/roles_data_mapper/strategy/multi/many_roles.rb,
lib/roles_data_mapper/role_class.rb,
lib/roles_data_mapper/strategy/single/one_role.rb

Overview

TODO: Refactor into strategy method to make generic and not hardcoded names and model linking

Class Method Summary collapse

Methods included from RoleClass::ClassMethods

find_role, find_roles

Class Method Details

.named(role_names) ⇒ Object



4
5
6
# File 'lib/roles_data_mapper/role_class.rb', line 4

def self.named role_names 
  where(:name.in => role_names.flatten)
end