# REST url generation for nested resources

**URL:** <https://www.ruby-forum.com/t/rest-url-generation-for-nested-resources/107415>\
**Category:** Rails\
**Created:** [June 21, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/rest-url-generation-for-nested-resources/107415 "2007-06-21T17:11:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Yang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a88e4f/32.png) [@Kevin\_Yang](https://www.ruby-forum.com/u/Kevin_Yang)\
**Post date:** [June 21, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/rest-url-generation-for-nested-resources/107415/1 "2007-06-21T17:11:46Z")

</div>

Hello everyone,

question:

suppose program has\_many episodes

```
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
