Class: FlashPatch::Rails31SessionLoader
- Inherits:
-
Object
- Object
- FlashPatch::Rails31SessionLoader
- Defined in:
- lib/flash_patch/rails_3_1_session_loader.rb
Instance Method Summary collapse
-
#initialize(decrypted_session_string) ⇒ Rails31SessionLoader
constructor
A new instance of Rails31SessionLoader.
- #load_session ⇒ Object
Constructor Details
#initialize(decrypted_session_string) ⇒ Rails31SessionLoader
Returns a new instance of Rails31SessionLoader.
3 4 5 |
# File 'lib/flash_patch/rails_3_1_session_loader.rb', line 3 def initialize(decrypted_session_string) @decrypted_session_string = decrypted_session_string end |
Instance Method Details
#load_session ⇒ Object
7 8 9 10 11 12 |
# File 'lib/flash_patch/rails_3_1_session_loader.rb', line 7 def load_session session = Marshal.load @decrypted_session_string.gsub('FlashHash','FlashGash') = session.delete('flash') session['flash'] = ActionDispatch::Flash::FlashHash.new.update() session end |