6/9 part 4

Hi, what we should do here (stage 4) ? I think this course a little difficult for noobs)

Hi Happylol,

Would you mind posting a link to the exercise you’re on so I can try to explain it to you?
Thanks :slight_smile:

For 6/9, number 4

I’m confused about this one as well.

1 Like

@sweet_sparrow Thanks for the link :slight_smile:

OK, so the instructions given say:

Then in the view app/views/destinations/show.html.erb, display the destination’s image, name, and description.

<%= image_tag %> is how you render an image in Rails. And since all of the stuff you need (for this) is stored as strings in a database, you can just use <%= @destination.description %> to render it’s description. So, you’d do something like:

<!-- other code -->
<%= image_tag @destination.image %>
<!-- display the name here; see the hint below if you need help-->
<%= @destination.description %>
<!-- other code -->

Since the name is just like the description, you could do this:

<%= @destination.name %>

I hope this helps, feel free to ask follow up questions :slight_smile:


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