Getting this error. The error seems to indicate that there is no object called “filmography” when in fact there is, and I passed that step of the course.
Here’s my show.html.erb file:
<div class="main actor-show">
<div class="container">
<!-- Display an actor's info here -->
<div class="actor">
<%= image_tag(@actor.image) %>
<div class="info">
<h3 class="actor-name"><%= @actor.first_name+" "[email protected]_name %></h3>
<p class="actor-bio"><%= @actor.bio %></p>
</div>
</div>
<h2>Movies</h2>
<% @filmography.each do |f| %>
<div class="movie">
<%= image_tag(f.image) %>
<h3 class="movie-title"><%= f.title %></h3>
<p class="movie-release-year"><%= f.release_year %></p>
<p class="movie-plot"><%= f.plot %></p>
</div>
<% end %>
</div>
Here’s the ‘actors#show’ action:
def show
@actor = Actor.find_by(params[:id])
@filmography = @actor.movies
end
Am I missing something dumb here? Again, all the previous steps turned up green.