Module: Mongoid::Document::Roleable::ClassMethods

Defined in:
lib/mongoid-simple-roles.rb

Instance Method Summary collapse

Instance Method Details

#find_roles(roles) ⇒ Object



34
35
36
37
# File 'lib/mongoid-simple-roles.rb', line 34

def find_roles(roles)
  roles = [roles] unless roles.is_a? Array
  criteria.in(:roles => roles).to_a
end