Module: ActiveCrypto::ActionController
- Defined in:
- lib/active_crypto.rb
Overview
:nodoc:
Class Method Summary collapse
-
.append_features(base) ⇒ Object
This includes some basic support in the ActionController for handling session keys.
Instance Method Summary collapse
-
#clear_session_keys ⇒ Object
Clears the session keys.
Class Method Details
.append_features(base) ⇒ Object
This includes some basic support in the ActionController for handling session keys. It creates two filters one before the action and one after. These do the following:
If the users session already has a ‘session_keys’ value it loads it into the ActiveRecord::Base.session_keys class field. If not it clears any existing session_keys.
Leaving the action it stores any session_keys in the corresponding session variable.
These filters are automatically enabled. You do not have to do anything.
To manually clear the session keys call clear_session_keys. This should be done for example as part of a session log off action.
285 286 287 288 289 |
# File 'lib/active_crypto.rb', line 285 def self.append_features(base) #:nodoc: super base.send :prepend_before_filter, :load_session_keys base.send :prepend_after_filter, :save_session_keys end |
Instance Method Details
#clear_session_keys ⇒ Object
Clears the session keys. Call this when a user logs of.
294 295 296 |
# File 'lib/active_crypto.rb', line 294 def clear_session_keys ActiveRecord::Base.clear_session_keys end |