For some reason my validation errors are being picked up but are not displaying on the page as I would like below is my model and the new view. I will also attach a picture of my validation error being picked up but not displaying in the view.
Model
class Review < ApplicationRecord
belongs_to :user
belongs_to :tea
validates :title, presence: true
validates :rating, numericality: {only_integer: true, greater_than_or_equal_to: 0, less_than: 11}
validates :tea, uniqueness: {scope: :user, message: "has already been reviewed by you" }
scope :order_by_rating, ->{group(:id).order('avg(reviews.rating) desc')}
end
View
<h1>Write a Review for </h1>
<%= form_for Review.new do |f|%>
<% if @review.errors.any? %>
<h2>Errors:</h2>
<ul>
<% @review.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
<% end %>

saveinstead ofsave!save!.<%= form_for Review.new do |f|%>instead of<%= form_for @review do |f|%>. With the former any user input is lost.