Issue with nested resource

I’m trying to use nested resources to generate links to the responses
that exist in this category.

Instead of:
http://localhost:3000/categories/4/responses/4/edit
It generates this:
http://localhost:3000/categories/4%2F5/responses/4/edit

See that extra URL Encoded slash 5 (%2F5=/5)? Why is that showing up?

Here’s my code:

    <% unless @category.responses.empty? %> <% @category.responses.each do |response| %>
  • <%= link_to response.name, edit_category_response_path([@category,response]) %>
  • <% end %> <% end %>

Okay. I got it. Apparently one shouldn’t pass the parameters as an
array like in form_for:

edit_category_response_path(@category,response)