Module: RoleStrategy::DataMapper::OneRole
- Extended by:
- Roles::Generic::User::Configuration
- Defined in:
- lib/roles_data_mapper/strategy/single/one_role.rb
Defined Under Namespace
Modules: ClassMethods, Implementation
Class Method Summary
collapse
Class Method Details
.default_role_attribute ⇒ Object
14
15
16
|
# File 'lib/roles_data_mapper/strategy/single/one_role.rb', line 14
def self.default_role_attribute
:one_role
end
|
.included(base) ⇒ Object
18
19
20
21
22
23
|
# File 'lib/roles_data_mapper/strategy/single/one_role.rb', line 18
def self.included base
base.extend Roles::Generic::Role::ClassMethods
base.extend ClassMethods
base.instance_eval "belongs_to :one_role, :class_name => 'Role'" end
|