lib/rails_warden.rb in rails_warden-0.5.1 vs lib/rails_warden.rb in rails_warden-0.5.2
- old
+ new
@@ -62,24 +62,19 @@
raw_session.clear
end
end
Warden::Manager.before_failure do |env, opts|
- action = RailsWarden.unauthenticated_action || "unauthenticated"
+ opts ||= {}
+ action = opts[:action] || RailsWarden.unauthenticated_action || "unauthenticated"
if Rails.respond_to?(:version) && Rails.version >= "3"
env['action_dispatch.request.path_parameters'][:action] = action
else
env['warden'].request.params['action'] = action
end
end
-# Rails needs the action to be passed in with the params
-Warden::Manager.before_failure do |env, opts|
- env['warden'].request.params["action"] = RailsWarden.unauthenticated_action
-end
-
-
if !defined?(Rails::Railtie)
Rails.configuration.after_initialize do
class ::ActionController::Base
include RailsWarden::Mixins::HelperMethods
include RailsWarden::Mixins::ControllerOnlyMethods
@@ -104,10 +99,10 @@
end
end
class Warden::SessionSerializer
def serialize(user)
- [user.class, user.id]
+ [user.class.name, user.id]
end
def deserialize(key)
klass, id = key
klass = case klass