# REST url generation for nested resources.

**URL:** <https://discuss.rubyonrails.org/t/rest-url-generation-for-nested-resources/14709>\
**Category:** rubyonrails-talk\
**Created:** [June 21, 2007, 3:10pm UTC](https://discuss.rubyonrails.org/t/rest-url-generation-for-nested-resources/14709 "2007-06-21T15:10:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Yang](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@Kevin\_Yang](https://discuss.rubyonrails.org/u/Kevin_Yang)\
**Post date:** [June 21, 2007, 3:10pm UTC](https://discuss.rubyonrails.org/t/rest-url-generation-for-nested-resources/14709/1 "2007-06-21T15:10:31Z")

</div>

Hello everyone,

question:

&nbsp;&nbsp;&nbsp;suppose program has\_many episodes

&nbsp;&nbsp;&nbsp;&nbsp;in the restful form\_for ,

\<% form\_for (:episode,:url =\> @episode\_path(@episode.program.id,@episode))

It looks redandant to me that why do i need to pass the two parameters ,in which case only @episode is enough?

why rails do this? why not to save the first paramter?

thanks very much

Kevin
