表单路径是user/invitations/invitations/edit.html.erb
和new.html.erb
编辑.html.erb
<h2><%= t 'devise.invitations.edit.header' %></h2>
<%= form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
<%= devise_error_messages! %>
<%= f.hidden_field :invitation_token %>
<p><%= f.label :username %><br />
<%= f.text_field :username %></p>
<p><%= f.label :password %><br />
<%= f.password_field :password %></p>
<p><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></p>
<p><%= f.submit t("devise.invitations.edit.submit_button") %></p>
<% end %>
我自己添加了以下内容,edit.html.erb
但表单未显示字段
<p><%= f.label :username %><br />
<%= f.text_field :username %></p>
请让我知道如何处理这个问题。并为 devise_invitable 定制表单