Movies II step 5/7


#1

I have been passed through to the end of this step however I am not getting the movie index showing the movies, etc...
i went back and re-ran teh seed but had an error - i am not sure the db is populated with teh seed data since the coding is allowing me to advance...


#2

Hi Darren,

Please post your code, the error message(s) you're getting, etc. so we can help you :)
Thanks!


#3

here is the movie index code:

 <% @movies.each do |movie| %>
    <div class="movie">
      <%= image_tag movie.image %>
      <h3><%= movie.title %></h3>
      <p><%= movie.release_year %></p>
      <%= link_to "Learn more", movie_path(m) %>
    </div>
    <% end %>
  </div>
</div>

Nothing shows under the "popular Movies"


#4

Here is the movie 'show' code

  <div class="info">
        <%=image_tag @movie.image %><!-- 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>
      </div>
    </div>

    <h2>Cast</h2>
    <% @actors.each do |a| %><!-- Display each actor's info here -->
    <div class="actor">
      <%= image_tag a.image %><!-- actor image -->
      <h3 class="actor-name"><%=a.first_name%>, <%=a.last_name %></h3>
      <p class="actor-bio"><%=a.bio %></p>
    </div>
    <% end %>
  </div>
</div>

#5

Here is the actors index code:

div class="main actor-index">
      <div class="container">
        <div class="row">

          <% @actors.each do |a| %>
          <div class="actor col-xs-2">
            <%=image_tag a.image %>
            <h3> <%=a.first_name %> <%= a.last_name %></h3>
            <p><%=a.bio %></p><% link_to "Learn more", actor_path(a) %>
          </div>
          <% end %>
          
      </div>
</div>

and the associated 'show' code:

<div class="main actor-show">
  <div class="container">
    
    <!-- Display an actor's info here -->
    <div class="actor">
      <%=image_tag @actor.image %> <!-- actor image -->
      <div class="info">
        <h3 class="actor-name"><%=@actor.first_name %> <%=@actor.last_name %>  </h3>
        <p class="actor-bio"><%=@actor.bio %>  </p>
      </div>
    </div>

    <h2>Movies</h2>
    <% @movies.each do |m| %><!-- Display each movie's info here -->
    <div class="movie">
      <%=image_tag m.image %> <!-- movie image -->
      <h3 class="movie-title"><%=m.title %>  </h3>
      <p class="movie-release-year"><%=m.release_year %>  </p>
      <p class="movie-plot"><%=m.plot %>  </p>
    </div>
    <% end %>
  </div>
</div>

#6

@arcplayer76328 Sorry for not replying sooner! This tab accidentally got buried in a bunch of others. Anyway, your problem is in app/views/movies/index.html.erb:

There's no such thing as m, it needs to be movie_path(movie) :)


#7

<%= link_to "Learn more", movie_path(m) %> should be

<%= link_to "Learn more", movie_path(movie) %>