错误的参数数量(给定0,预期1+)Rails

时间:2017-03-14 17:47:02

标签: ruby-on-rails devise

我在我刚刚定制的devise新密码页面上收到此错误:

wrong number of arguments (given 0, expected 1+)

我的ERB非常简单:

<h1 style="color: black">Forgot Your Password?</h1>

<%= simple_form_for(resource, as: resource_name, url: password_path, html: { method: :post }) do |f| %>  <<<<<<<ERROR CALLED ON THIS LINE
    <%= f.error_notification %>

    <div class="form-inputs text-left">
        <%= f.input :email, required: true, autofocus: true %>
    </div>

    <div class="form-actions">
        <%= f.button :submit, "Send Me Reset Password Instructions", class: "btn-custom" %>
    </div>
<% end %>

<%= render "devise/shared/links" %>

但我似乎无法弄清楚为什么会产生这个错误。有没有人遇到过这个问题?

1 个答案:

答案 0 :(得分:2)

您需要更改missing_ids

password_path