Link_to to add a link to that movie | RoR Associetions Movies II


#1

https://www.codecademy.com/en/courses/learn-rails/lessons/many-to-many/exercises/many-to-many-movies-ii?action=resume

<h2>Movies</h2>
 <% @movies.each do |movie| %><div class="movie">
   <%= image_tag movie.image %>
   <h3 class="movie-title"><%= movie.title %></h3>
   <p class="movie-release-year"><%= movie.release_year %></p>
   <p class="movie-plot"><%= movie.plot %></p>
   <%= link_to 'Learn more', movie_path(movie) %>
 </div>
 <% end %>

I read in another thread that there was a bug in this exercise, but it was supposed to be fixed. I get the error 'Did you add link for movie?'.

I also tried <%= link_to 'Learn more', movie_path(@movie) %>

Thanks!


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.