Ruby on rails designe edit.html.erb视图中的语法错误
基本上,当我登录时,我会尝试导航到 只是为了检查我是否得到了编辑用户信息的表单,但我得到了以下错误:Ruby on rails designe edit.html.erb视图中的语法错误,ruby-on-rails,ruby,Ruby On Rails,Ruby,基本上,当我登录时,我会尝试导航到 只是为了检查我是否得到了编辑用户信息的表单,但我得到了以下错误: app/views/devise/registrations/edit.html.erb:16: syntax error, unexpected ':', expecting ')' input_html: { autocomplete: "new-password ^ <h2>Edit <%= resource_name.to_s.humanize %>&l
app/views/devise/registrations/edit.html.erb:16: syntax error, unexpected ':', expecting ')' input_html: { autocomplete: "new-password ^
<h2>Edit <%= resource_name.to_s.humanize %></h2>
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<%= f.input :email, required: true, autofocus: true %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
<% end %>
<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false
input_html: { autocomplete: "new-password" } %>
<%= f.input :password_confirmation,
required: false,
input_html: { autocomplete: "new-password" } %>
<%= f.input :current_password,
hint: "we need your current password to confirm your changes",
required: true,
input_html: { autocomplete: "current-password" } %>
</div>
<div class="form-actions">
<%= f.button :submit, "Update" %>
</div>
<% end %>
<h3>Cancel my account</h3>
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
<%= link_to "Back", :back %>
app/views/designe/registrations/edit.html.erb:16:语法错误,意外的“:”,预期的“)”输入\u html:{autocomplete:“新密码”^
编辑
目前正在等待确认:
取消我的帐户
不开心
我没有修改任何视图,也没有生成任何用户控制器
我正在使用Desive(4.5.0)、Rails 5.2.1和Ruby 2.4.4p296
感谢您的帮助您可以将其关闭。我发现了错误。所需行中缺少:false。
它从一开始就不起作用,因为当我生成Desive视图时,我的rails可能有一个bug。如果缺少一个逗号,请将密码部分更改为下面的内容
<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false, <= this comma
input_html: { autocomplete: "new-password" } %>