1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

fix argument bug

when `is_navigational_format?` returns false, Exception will be throw: 
ArgumentError (Nil location provided. Can't build URI.)
This commit is contained in:
Michael Ding 2014-09-29 14:36:05 +08:00
parent 9f63850279
commit 002b4c6c01

View file

@ -33,7 +33,7 @@ class Devise::ConfirmationsController < DeviseController
# The path used after resending confirmation instructions.
def after_resending_confirmation_instructions_path_for(resource_name)
new_session_path(resource_name) if is_navigational_format?
is_navigational_format? ? new_session_path(resource_name) : '/'
end
# The path used after confirmation.