lib/warden/manager.rb
# Reconstitutes the user from the session.
# Use the results of user_session_key to reconstitute the user from the session on requests after the initial login
# You can supply different methods of de-serialization for different scopes by passing a scope symbol
#
# Example:
#   Warden::Manager.serialize_from_session{ |id| User.get(id) }
#   # With Scope:
#   Warden::Manager.serialize_from_session(:admin) { |id| AdminUser.get(id) }
#
# :api: public
Reconstitutes the user from the session.
Use the results of user_session_key to reconstitute the user from the session on requests after the initial login
You can supply different methods of de-serialization for different scopes by passing a scope symbol



:api: public
Reconstitutes the user from the session . Use the results of user_session_key to reconstitute the user from the session on requests after the initial login You can supply different methods of de - serialization for different scopes by passing a scope symbol : api : public
def serialize_from_session(scope = nil, &block)
        method_name = scope.nil? ? :deserialize : "#{scope}_deserialize"
        if Warden::SessionSerializer.method_defined? method_name
          Warden::SessionSerializer.send :remove_method, method_name
        end
        Warden::SessionSerializer.send :define_method, method_name, &block
      end
def serialize_from_session ( scope = nil , & block ) method_name = scope . nil? ? :deserialize : "#{scope}_deserialize" if Warden :: SessionSerializer . method_defined? method_name Warden :: SessionSerializer . send :remove_method , method_name end Warden :: SessionSerializer . send :define_method , method_name , & block end
Reconstitutes the user from the session.
Reconstitutes the user from the session .
scope
<not_specific>
block
<not_specific>