RoR course, Associations I, exercise 5. Show a tag

hi, guys. Help me, please. Don’t know what to do in the exerice 5:
5. Show a tag .

In paricular point 3 of the exercise:

"3.In app/views/tags/show.html.erb inside the

element, display a tag’s title.

Then in

, iterate through each destination in the @destinations array and display its image, name, and description."

What do I have to do there?

1 Like

Here is my solution:

<h2><%= @tag.title %></h2>

<div class="cards row">

  <% @destinations.each do |d| %>
  <div class="card col-xs-4">
    <%= image_tag d.image %>
    <h2><%= %></h2>
    <p><%= d.description %></p>
    <p><%= link_to "See more", destination_path(d) %></p>
  <% end %>


When I tried that code i got the erorror message
undefined method `destination_path’ for #<#Class:0x00000005d487f8:0x00000005d5d388>

Please help

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