# Issue with nested resource

**URL:** <https://www.ruby-forum.com/t/issue-with-nested-resource/131612>\
**Category:** Rails\
**Created:** [March 11, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/issue-with-nested-resource/131612 "2008-03-11T22:21:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danhobbs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@danhobbs](https://www.ruby-forum.com/u/danhobbs)\
**Post date:** [March 11, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/issue-with-nested-resource/131612/1 "2008-03-11T22:21:55Z")

</div>

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](http://localhost:3000/categories/4/responses/4/edit)  
It generates this:  
[http://localhost:3000/categories/4%2F5/responses/4/edit](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 %\>

---

<div class="post-metadata">

**Author:** ![danhobbs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a5b964/32.png) [@danhobbs](https://www.ruby-forum.com/u/danhobbs)\
**Post date:** [March 12, 2008, 5:09am UTC](https://www.ruby-forum.com/t/issue-with-nested-resource/131612/2 "2008-03-12T05:09:11Z")

</div>

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

edit\_category\_response\_path(@category,response)
