![](/img/trans.png)
[英]Rails - ArgumentError (wrong number of arguments (given 1, expected 0)):
[英]Wrong number of arguments (given 0, expected 1+) Rails
我在幾乎不定制的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" %>
但是我似乎無法弄清楚為什么會產生此錯誤。 有人遇到過這個問題嗎?
您需要將password_path
更改為password_path(resource_name)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.