Module: TrickSerial::Serializer::Rails::V3::SessionStoreSerializer
- Defined in:
- lib/trick_serial/serializer/rails.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_session_with_trick_serial_serializer(env, sid) ⇒ Object
- #set_session_with_trick_serial_serializer(env, sid, session_data) ⇒ Object
Class Method Details
.included(target) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'lib/trick_serial/serializer/rails.rb', line 34 def self.included target super target.class_eval do alias :get_session_without_trick_serial_serializer :get_session alias :get_session :get_session_with_trick_serial_serializer alias :set_session_without_trick_serial_serializer :set_session alias :set_session :get_session_with_trick_serial_serializer end end |
Instance Method Details
#get_session_with_trick_serial_serializer(env, sid) ⇒ Object
44 45 46 47 |
# File 'lib/trick_serial/serializer/rails.rb', line 44 def get_session_with_trick_serial_serializer env, sid result = get_session_without_trick_serial_serializer env, sid result end |
#set_session_with_trick_serial_serializer(env, sid, session_data) ⇒ Object
49 50 51 52 53 54 |
# File 'lib/trick_serial/serializer/rails.rb', line 49 def set_session_with_trick_serial_serializer env, sid, session_data serializer = (env[:'TrickSerial::Serializer.instance'] || TrickSerial::Serializer.default).dup session_data = serializer.encode(session_data) set_session_without_trick_serial_serializer env, sid, session_data result end |