Update Destination I Step 5


#1

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


#2

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?


#5

https://www.codecademy.com/en/courses/learn-rails/lessons/one-many/exercises/one-many-update-destination-i?action=resume

Here's the link.


#7

Here's my app/controllers/destinations_controller.rb


#8

Here's my config/routes.rb


#9

@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:


#10

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


#11


#12

I FINALLY got it o work.


#13

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


#14

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