Module: Authorized::ModelMethods::ClassMethods

Defined in:
lib/authorized.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_authorizedObject

Mixin method setting the relation N-1 getting workspace Role objects through the 'users_workspaces' table and including instance methods usefull to get roles and permissions.



14
15
16
17
18
# File 'lib/authorized.rb', line 14

def acts_as_authorized
				# Relation N-1 getting workspace Role objects through the 'users_workspaces' table
				has_many :container_roles, :through => :users_containers, :source => :role
				include Authorized::ModelMethods::InstanceMethods
end