Update Destination I Step 5

What is wrong with my code!!! Help!!!

Hi @suttonjd19,

Could you please post a link to the exercise you’re on and your code in config/routes.rb and app/controllers/destinations_controller.rb?


Here’s the link.

Here’s my app/controllers/destinations_controller.rb

Here’s my config/routes.rb

@suttonjd19 In config/routes.rb, can you add as: :destination to the end of line 4, so it looks like this:

get 'destinations/:id' => 'destinations#show', as: :destination

and see if that works :slight_smile:

I added ‘destinations/:id’ => ‘destinations#show’, as: :destination’ like you said, and now it is returning this.

I FINALLY got it o work.

1 Like

But, oh my god thank you for the help anyway, it would work with the new code if I didn’t have get ‘destinations/:id’ => ‘destinations#show’, as: :destination

1 Like

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