Rendering devise error messages in scoped custom form

前端 未结 1 1676
终归单人心
终归单人心 2021-01-24 04:49

I have to Devise models, User and Vendor. I generated the views for Vendor and customized the signup form to suit my needs. I needed to tweak the regis

1条回答
  •  没有蜡笔的小新
    2021-01-24 05:27

    I would write this as a comment, but it will be easier to read as an answer:

    Perhaps you could try replacing devise_error_messages! with a standard Rails error display:

    <% if resource.errors.any? %>
        
    <%= pluralize(resource.errors.count, "Error") %>
      <% resource.errors.each do |attr,msg| %>
    • <%= msg %>
    • <% end %>
    <% end %>

    0 讨论(0)
提交回复
热议问题