Module: RoleStrategy::ActiveRecord::OneRole
- Extended by:
- Roles::Generic::User::Configuration
- Defined in:
- lib/roles_active_record/strategy/single/one_role.rb
Defined Under Namespace
Modules: ClassMethods, Implementation
Class Method Summary
collapse
Class Method Details
.default_role_attribute ⇒ Object
10
11
12
|
# File 'lib/roles_active_record/strategy/single/one_role.rb', line 10
def self.default_role_attribute
:one_role
end
|
.included(base) ⇒ Object
14
15
16
17
18
|
# File 'lib/roles_active_record/strategy/single/one_role.rb', line 14
def self.included base
base.extend Roles::Generic::Role::ClassMethods
base.extend ClassMethods
base.belongs_to :one_role, :foreign_key => :role_id, :class_name => 'Role'
end
|