我发现这篇文章关于使用devise login from another page。
我按照说明操作并尝试在编辑user
表单上使用它。 (我使用rails g devise:views
生成了设计视图,我的模型称为user
)
但是为新用户生成了表单。
<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post" role="form">
有人可以帮忙吗?非常感谢提前。
我的html.erb
代码......
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, :role => 'form' }) do |f| %>