Problem with 3/5 Movies II


#1

Link to the lesson I have problem with : https://www.codecademy.com/courses/learn-rails/lessons/many-to-many/exercises/many-to-many-movies-ii?action=resume_content_item

Task: in this part of the module:

  • In app/view/movies/show.html.erb

  • Inside <div class="movie">...</div> , display the movie’s image, title, release year, and plot.

  • Below <h2>Cast</h2> , iterate through each actor and display the image, first name, last name, and bio.

My show.html.erb code:

Error says : undefined method `name’ for nil:NilClass.

Somebody please tell me what am I doing wrong?


#2

Hi @dataplayer77767,

Are you still having this issue? If so, please run this command in your terminal and copy/paste the output here:

$ grep -rn '\.name' .