errors use correct variable name

This commit is contained in:
Aaro Koivukangas
2023-08-10 18:11:54 +03:00
parent 8fb5db0025
commit 9939f51934
+2 -2
View File
@@ -3,10 +3,10 @@
<%= form_for(@rating) do |f| %>
<% if @rating.errors.any? %>
<div style="color: red">
<h2><%= pluralize(user.errors.count, "error") %> prohibited this user from being saved:</h2>
<h2><%= pluralize(@rating.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% user.errors.each do |error| %>
<% @rating.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>