6.5 Cant resolve "Did you add Destination link" With multiple variances of code


#1

Seems multiple people are having this issue. I tried their resolutions without any luck. Help!?

<div class="header">
  <div class="container">
    <img src="http://s3.amazonaws.com/codecademy-content/courses/learn-rails/img/logo-1tm.svg" width="80">
    <h1>BokenjiKan</h1>
  </div>
</div>

<div class="tag">
  <div class="container">
    <h2><%= @tag.title %></h2>

    <div class="cards row">

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

  </div>
</div>

#2

Please post a link to the exercise. Thank you.


#3

Here you go:

https://www.codecademy.com/en/courses/learn-rails/lessons/one-many/exercises/one-many-show-destination


#4

Which file is the one in the opening post?


#5

app/views/tags/show.html.erb

Its been updated to reflect how my code currently is.


#6

That file looks okay. Can we have a look at your routes.db file, as well as the destinations controller and its show.html.erb file?


#7

Destinations controller

class DestinationsController < ApplicationController
	def show
    @destination = Destination.find(params[:id])
  end
end

Destinations whow.html.erb

<div class="header">
  <div class="container">
    <img src="http://s3.amazonaws.com/codecademy-content/courses/learn-rails/img/logo-1tm.svg" width="80">
    <h1>BokenjiKan</h1>
  </div>
</div>

<div class="destination">
  <div class="container">
    <div class="row">
      <div class="col-xs-12">

        <!-- Your code here -->
        <%= image_tag @destination.image %>
        <h2>
          <%= @destination.name %>
        </h2>
      <%= @destination.description %>
      </div>
    </div>
  </div>
</div>

#8

Should this be wrapped in a <p></p> element?


#9

Hi,

It seems you are missing a ',' after the "See More"

The syntax is (example):
link_to "Profiles", profiles_path

So your line should be:
<%= link_to "See more", destination_path(d) %>

Hope that helps!
Diego


#10

Can you help me with my code? I'm stuck on "Show A Tag" step three.
I can screenshot my code if you need it.


#11

Hi,

It seems you are missing a ',' after the "See More"

The syntax is (example):
link_to "Profiles", profiles_path

So your line should be:
<%= link_to "See more", destination_path(d) %>

Hope that helps!
Diego

Oh my god i can't believe it was something so simple. thanks!


#12

suttonjd1918m
Can you help me with my code? I'm stuck on "Show A Tag" step three.
I can screenshot my code if you need it.

Sure, id recommend you open a new thread though so it does not get mixed up with this one.


#13

Never mind. I figured out what was wrong with it. But thank you a lot anyway.


#14