Note that there are some explanatory texts on larger screens.

plurals
  1. PODevise forgot password throws ArgumentError in Devise::PasswordsController#create
    primarykey
    data
    text
    <p>Initially, I was having this issue only on my heroku app, but after updating the devise gem to 2.2.4, I have the issue on my localhost as well.</p> <p>My main concern is that I am getting this error:</p> <pre><code>ArgumentError (wrong number of arguments (2 for 1)): app/mailers/user_mailer.rb:58:in `reset_password_instructions' </code></pre> <p>I've updated the devise gem to</p> <pre><code>devise (2.2.4) </code></pre> <p>And I am running:</p> <pre><code>Rails 3.2.11 </code></pre> <p>My development.rb initializer has the following host:</p> <pre><code>config.action_mailer.default_url_options = { :host =&gt; 'localhost:3000' } </code></pre> <p>This is where line 58 starts in my user_mailer.rb file:</p> <pre><code>def reset_password_instructions(user) devise_mail(user, :reset_password_instructions) end </code></pre> <p>My question is, why am I sending two arguments? It should only be sending in the e-mail address as defined in my devise/passwords/new.html.erb file:</p> <pre><code>&lt;div class="container"&gt; &lt;%= form_for(resource, :html =&gt; {:class =&gt; "form-signin", :method =&gt; :post}, :as =&gt; resource_name, :url =&gt; password_path(resource_name)) do |f| %&gt; &lt;h2 class = "form-signin-heading"&gt;Forgot your password?&lt;/h2&gt; &lt;%= devise_error_messages! %&gt; &lt;%= f.email_field :email, :type =&gt; "text", :class =&gt;"input-block-level", :placeholder =&gt; "Email Address" %&gt; &lt;%= f.submit "Send me reset password instructions", :class =&gt; "btn btn-large btn-primary" %&gt; &lt;/br&gt; &lt;/br&gt; &lt;%= render "devise/shared/links" %&gt; &lt;% end %&gt; &lt;/div&gt; </code></pre> <p><strong>EDIT:</strong> My reset_password_instructions.html.erb file is here:</p> <pre><code>&lt;p&gt;Hello &lt;%= @resource.email %&gt;!&lt;/p&gt; &lt;p&gt;Someone has requested a link to change your password, and you can do this through the link below.&lt;/p&gt; &lt;p&gt;&lt;%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token =&gt;@resource.reset_password_token) %&gt;&lt;/p&gt; &lt;p&gt;If you didn't request this, please ignore this email.&lt;/p&gt; &lt;p&gt;Your password won't change until you access the link above and create a new one.&lt;/p&gt; </code></pre> <p>Can anyone spot an issue?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload