24
25
26
27
28
29
30
|
# File 'lib/zuul/active_record/permission.rb', line 24
def self.add_associations(base)
base.send :has_many, base.auth_scope.permission_role_plural_key, :class_name => base.auth_scope.permission_role_class_name, :dependent => :destroy
base.send :has_many, base.auth_scope.role_plural_key, :class_name => base.auth_scope.role_class_name, :through => base.auth_scope.permission_role_plural_key
base.send :has_many, base.auth_scope.permission_subject_plural_key, :class_name => base.auth_scope.permission_subject_class_name, :dependent => :destroy
base.send :has_many, base.auth_scope.subject_plural_key, :class_name => base.auth_scope.subject_class_name, :through => base.auth_scope.permission_subject_plural_key
end
|