Module: Rolify::Resource
- Defined in:
- lib/rolify/resource.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/rolify/resource.rb', line 3 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#applied_roles ⇒ Object
44 45 46 47 |
# File 'lib/rolify/resource.rb', line 44 def applied_roles #self.roles + self.class.role_class.where(:resource_type => self.class.to_s, :resource_id => nil) self.roles + self.class.applied_roles(true) end |