NoMethodError in Advice#show

Showing /home/deploy/apps/dresscodefinder/releases/20240224180909/app/views/advice/show.html.erb where line #7 raised:

undefined method `name' for nil:NilClass
Extracted source (around line #7):
5
6
7
8
9
10
              
<%= image_tag "hero-left-2x.png", class: "hero-left-img" -%>
<%= image_tag "hero-right-2x.png", class: "hero-right-img" -%>
<div class="col-sm-8 col-md-10 col-lg-9 col-xl-6 col-content ">
<div class="dress-code pl-4 pr-4">
<h1><%= @advice.name.html_safe %></h1>
<p class="dress-code-p"><%= @advice.introduction.html_safe %></p>

Rails.root: /home/deploy/apps/dresscodefinder/releases/20240224180909

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"category"=>"Dress Code Advice", "permalink"=>"dubai-dress-code"}

Response

Headers:

None