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

Allow to override the path after resending confirmation instructions.

This commit is contained in:
Hiroki Yoshioka 2011-04-15 15:39:54 +08:00 committed by José Valim
parent f009011179
commit bd9f148d24

View file

@ -13,7 +13,7 @@ class Devise::ConfirmationsController < ApplicationController
if resource.errors.empty?
set_flash_message(:notice, :send_instructions) if is_navigational_format?
respond_with resource, :location => new_session_path(resource_name)
respond_with resource, :location => after_resending_confirmation_instructions_path_for(resource_name)
else
respond_with_navigational(resource){ render_with_scope :new }
end
@ -31,4 +31,11 @@ class Devise::ConfirmationsController < ApplicationController
respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render_with_scope :new }
end
end
protected
# The path used after resending confirmation instructions.
def after_resending_confirmation_instructions_path_for(resource_name)
new_session_path(resource_name)
end
end