Warden before_failure hooks are an array, not a proc

This commit is contained in:
Josh Starcher 2010-12-21 05:03:34 +08:00 committed by José Valim
parent 1cdb02bd54
commit 1a2590dc08
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ module Devise
env = @controller.request.env
env["PATH_INFO"] = "/#{result[:action]}"
env["warden.options"] = result
Warden::Manager._before_failure.each{ |hook| hook.call(env, result) }
Warden::Manager._before_failure.each{ |hook| hook.first.call(env, result) }
status, headers, body = Devise::FailureApp.call(env).to_a
@controller.send :render, :status => status, :text => body,