7/9 Link to edit page works, isn't accepted


I have a fully functioning link to the edit page for each destination, but it isn't accepted so I can't continue :confused:

        <%= image_tag @destination.image %>
        <h2><%= @destination.name %></h2>
        <p><%= @destination.description %></p>
        <p><%= link_to 'Edit', edit_destination_path(@destination) %></p>


Hi Kamran,

Your code looks fine to me, so I'm not sure why you're not being passed :slight_frown:

Could you try refreshing the page, and if that doesn't work, posting the link to the exercise here?


Not OP but I'm having the same issue and have tried the solutions you've outlined. I've even restarted the exercise.

Here's the exercise


@tbayya What's the error message you're getting?


@zystvan I'm being asked whether I added the edit link (which I have, the same way @kamran3210 has)


@tbayya This is what I have, and it worked fine:

<%= link_to "Edit", edit_destination_path(@destination) %>

Do you have this in your config/routes.rb file?

get '/destinations/:id/edit' => 'destinations#edit', as: :edit_destination


I did have the get statement (copied from the sidebar) in my code but when I pasted your snippets it was accepted. I don't know what went wrong, but thanks for your help!


@tbayya No problem, maybe it was the double versus single quotes around Edit? That shouldn't be it, but it's the only difference I see :confused:


This topic is inactive.