Sha256: 60604d6189e6b2a48ee934d351476371d607dfe2e0dfaeb93cff9ad442c509f2
Contents?: true
Size: 671 Bytes
Versions: 4
Compression:
Stored size: 671 Bytes
Contents
begin require 'warden' rescue gem 'warden' require 'warden' end # Session Serialization in. This block determines how the user will be stored # in the session. If you're using a complex object like an ActiveRecord model, # it is not a good idea to store the complete object. An ID is sufficient. Warden::Manager.serialize_into_session{ |user| [user.class, user.id] } # Session Serialization out. This block gets the user out of the session. # It should be the reverse of serializing the object into the session Warden::Manager.serialize_from_session do |klass, id| klass.find_by_id(id) end # Setup devise strategies for Warden require 'devise/strategies/base'
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
devise-0.5.0 | lib/devise/warden.rb |
shingara-devise-0.4.3.1 | lib/devise/warden.rb |
shingara-devise-0.4.3 | lib/devise/warden.rb |
devise-0.4.3 | lib/devise/warden.rb |