5/9 - Show a tag


#1

I have this error in my code. I've tried search here, in the Forum, but I didn't found the answer.

Code:

            <% @destinations.each do |destination| %>
      <div class="card col-xs-4">
         <%= image_destination destination.image %>
        <h2><%= @destinations.name %> </h2>
        <p> <%= @destinations.description %></p>
      </div>
        <%end%>

Message Error:
undefined method `image_destination' for #<#:0x0000000544fe58>


#2

Hi Sandro,

  1. You need to use <%= image_tag ... %>, not image_destination.
  2. Inside your loop, use destination to show the name and description, not @destinations.

#3

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