mtcrts70
mtcrts70

Reputation: 35

Rails/Devise--Forgot Password Feature Errors Out

When a user forgets their password on my app they are able to type in their email address and have password reset instructions sent to their email box like so:

enter image description here

When I click the 'Change my password' link I get the Heroku 'We're sorry but something went wrong' error. Looking at the heroku logs here is what is going wrong ("Template::Error (wrong number of arguments (3 for 1..2))):

enter image description here

Any thoughts on what is causing an extra argument to be passed?

Upvotes: 2

Views: 241

Answers (2)

Omar Sar
Omar Sar

Reputation: 138

this is what my devise password edit form looks like in this specific part:

<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>

Mines work perfect with Heroku. I see that you may have an extra argument. Try to compare mines with yours to figure out the fix.

you can replace

resource_name, resource

with

resource, as: resource_name,

Upvotes: 1

Ahmad Al-kheat
Ahmad Al-kheat

Reputation: 1795

try to delete the second argument resource , you have one extra argument there so I think it's this one. If it's still complaining then replace that part with :

resource, as: resource_name,

Upvotes: 1

Related Questions