Files
fixin.me/app/views/application/errors.turbo_stream.erb

8 lines
305 B
Plaintext

<%= turbo_stream.validate dom_target(*@target, :form) do %>
<% @record.errors.attribute_names.map do |attr| %>
<%= tag.span data: {name: field_name(dom_class(@record), attr)} do %>
<%- @record.errors.full_messages_for(attr).map { |m| m + '.' }.join(' ') %>
<% end %>
<% end %>
<% end %>