Module: SessionOff::InstanceMethods
- Defined in:
- lib/session_off.rb
Instance Method Summary collapse
- #disable_session ⇒ Object
-
#process_with_session_off(request, response, method = :perform_action, *args) ⇒ Object
Rails 2.3.x.
- #reset_session ⇒ Object
- #session ⇒ Object
- #session_enabled? ⇒ Boolean
Instance Method Details
#disable_session ⇒ Object
140 141 142 |
# File 'lib/session_off.rb', line 140 def disable_session @_session = false end |
#process_with_session_off(request, response, method = :perform_action, *args) ⇒ Object
Rails 2.3.x
155 156 157 158 159 160 |
# File 'lib/session_off.rb', line 155 def process_with_session_off(action, *args) = self.class.(request, action) request..merge! disable_session if [:disabled] process_without_session_off(action, *args) end |
#reset_session ⇒ Object
133 134 135 136 137 138 |
# File 'lib/session_off.rb', line 133 def reset_session if session_enabled? request.reset_session @_session = nil end end |
#session ⇒ Object
129 130 131 |
# File 'lib/session_off.rb', line 129 def session @_session == false ? nil : @_session ||= request.session end |
#session_enabled? ⇒ Boolean
125 126 127 |
# File 'lib/session_off.rb', line 125 def session_enabled? @_session != false end |