mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
not signed_in 302 redirect failed on Rails5 RC2
This commit is contained in:
@@ -137,9 +137,8 @@ module Devise
|
||||
|
||||
status, headers, response = Devise.warden_config[:failure_app].call(env).to_a
|
||||
@controller.response.headers.merge!(headers)
|
||||
r_opts = { status: status, content_type: headers["Content-Type"], location: headers["Location"] }
|
||||
r_opts[Rails.version.start_with?('5') ? :body : :text] = response.body
|
||||
@controller.send :render, r_opts
|
||||
@controller.status = status
|
||||
@controller.response.body = response.body
|
||||
nil # causes process return @response
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user