Devise "Confirm account instructions email" takes me to "Reset Password"

840 Views Asked by At

Once you sign_up, you get a confirmation email.

Do not confirm. Instead go to the app and click on didn't receive confirmation instructions and enter the same email id.

You will get a reset password instructions email instead of confirmation email.

Is this a devise bug, has anyone else encountered this problem ?

code for confirmation email

<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
  <%= devise_error_messages! %>

  <div class="clearfix">
    <%= f.label :email %>
    <div class="input">
      <%= f.email_field :email, :class => 'xlarge' %>
    </div>
  </div>

  <div class="actions"> 
    <%= button_tag "Resend confirmation instructions", :class => 'btn primary' %>
  </div>
<% end %>
1

There are 1 best solutions below

0
On BEST ANSWER

I don't think it is a Devise bug. I created a sample application that tries to reproduce this, but I couldn't find this behaviour (I have also uploaded the log).

EDIT (added when you added the pasted code):

You're using :url => password_path(resource_name) instead of :url => confirmation_path(resource_name). Doing this, you send a reset password request to passwordsController instead of a resend confirmation.