Show tags


How do you do this:
In app/views/tags/show.html.erb inside the < h2> element, display a tag's title.

Then in < div class="cards">...< /div>, iterate through each destination in the @destinations array and display its image, name, and description.

What's wrong with my code:

 <div class="card col-xs-4">
    <%= destination.image %>
    <h2><% = %> </h2>
    <p><% = destination.description %>  </p>
	<% end %>


Could it be the white space?

<%= ... %>


It's still not working

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



Should this read, image_tag?


it still gives an error


Please show us the entire file. Thanks.


<div class="header">
  <div class="container">
    <img src="" width="80">

<div class="tag">
  <div class="container">
    <h2 class="tag-title">  </h2>

    <div class="cards row">

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




Is this Step 4 of lesson 6?


its Associations I
5. Show tags
instruction 3


Still need to change this. Be sure to Run after changing.

Should read,

<%= image_tag d.image %>


You should replace the <h1>BokenjiKan</h1> with the tag's title.


I'm sorry but I don't see what this has to do with Lesson 5, Step 3. How is this helpful?


in ruby rail!!!!!!!!!!!


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