Module: Roles::Base

Defined in:
lib/roles_mongo_mapper/embedded_role.rb,
lib/roles_mongo_mapper/role.rb,
lib/roles_mongo_mapper/base.rb

Instance Method Summary collapse

Instance Method Details

#valid_roles_are(*role_list) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/roles_mongo_mapper/embedded_role.rb', line 2

def valid_roles_are(*role_list)
  strategy_class.valid_roles = role_list.to_symbols
  if role_class_name
    role_list.each do |name|
      role_class_name.create(:name => name.to_s)
    end
  end
end