FAQ: Associations I - Show a destination

This community-built FAQ covers the “Show a destination” exercise from the lesson “Associations I”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Ruby on Rails

FAQs on the exercise Show a destination

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Even before we create the Destinations controller there are views for tags/1, tags/2 and so on. How and where did those come from ?
like we create link_to “learn more”, tag_path(tag) <= is this the line where it goes to the link?

In the fourth step, I got this error message:
<% @destination.each do |d| %>
<%= image_tag d.image %>
<%= d.name %>
<%= d.description %>
<% end %>

undefined method `each’ for #Destination:0x00000004416960

> <div class="col-xs-12">
>           <%= image_tag ( @destination.image ) %>
>           <%= @destination.name %>
>           <%= @destination.description %>
> </div>
1 Like

https://discuss.codecademy.com/t/faq-associations-i-show-a-destination/374011/4?u=dev_sreeram

these are from the CSS already pre-built for you

I followed every step and was able to browse https://localhost:8000/tags but if I click any of the “Learn more” buttons I would get this error:

Missing template tags/show, application/show with {:locale=>[:en], :formats=>[:html], :variants=>, :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * “/home/ccuser/workspace/learn-rails-one-to-many/app/views”

I compared my code to the solution and found no difference. Wonder why this happened?

I can’t seem to generate controllers for Destinations

pwd shows I’m in the ‘/learn-rails-one-to-many’ directory, which I’m assuming is the project directory

No-shows_What Happened?!??