Fresh install Rails 7 and and devise 4.8.1
If I login in with wrong password, a flash error message will show up to page, like following screenshot:

But the weird thing is that flash error message is append to the end of html, like following screenshot:

the _error_message.html.erb is located in app/views/deivse/shared:
<% if resource.errors.any? %>
<div class="alert alert-primary" role="alert">
<div id="error_explanation">
<h2>
<%= I18n.t("errors.messages.not_saved",
count: resource.errors.count,
resource: resource.class.model_name.human.downcase)
%>
</h2>
<ul>
<% resource.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
</div>
<% end %>
I try to change above error view file, but the flash message still not change, even I empty the error view file.
Fresh install Rails 7 and and devise 4.8.1
If I login in with wrong password, a flash error message will show up to page, like following screenshot:
But the weird thing is that flash error message is append to the end of html, like following screenshot:
the
_error_message.html.erbis located inapp/views/deivse/shared:I try to change above error view file, but the flash message still not change, even I empty the error view file.