Class: Phenomenal::Context
- Inherits:
-
Object
- Object
- Phenomenal::Context
- Defined in:
- lib/phenomenal_rails/context.rb
Overview
Add persistent attribute to the context class, allowing to disable auto deactivation between HTTP requests
Instance Attribute Summary collapse
-
#persistent ⇒ Object
Returns the value of attribute persistent.
Instance Method Summary collapse
-
#is_persistent ⇒ Object
DSL inside context definition.
- #to_path ⇒ Object
Instance Attribute Details
#persistent ⇒ Object
Returns the value of attribute persistent.
4 5 6 |
# File 'lib/phenomenal_rails/context.rb', line 4 def persistent @persistent end |
Instance Method Details
#is_persistent ⇒ Object
DSL inside context definition
6 7 8 9 10 |
# File 'lib/phenomenal_rails/context.rb', line 6 def is_persistent @persistent = true activate nil end |
#to_path ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/phenomenal_rails/context.rb', line 12 def to_path if name name.to_s.underscore elsif self==manager.default_feature nil elsif manager.combined_contexts[self] manager.combined_contexts[self].flatten.join("/").underscore else nil end end |