Module: Zuul::ActiveRecord::ContextAccessors
- Defined in:
- lib/zuul/active_record/context_accessors.rb
Overview
These are included in roles & permissions objects and assigned roles & permissions objects to provide easy access to the context for that object.
Class Method Summary collapse
Instance Method Summary collapse
-
#context ⇒ Object
Return a Zuul::Context object representing the context for the role.
-
#context=(context) ⇒ Object
Parse a context into an Zuul::Context and set the type and id.
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/zuul/active_record/context_accessors.rb', line 6 def self.included(base) base.send :attr_accessible, :context if ::Zuul.should_whitelist? end |