# Form\_for on a nested singleton

**URL:** <https://www.ruby-forum.com/t/form-for-on-a-nested-singleton/149094>\
**Category:** Rails\
**Created:** [September 20, 2008, 9:03am UTC](https://www.ruby-forum.com/t/form-for-on-a-nested-singleton/149094 "2008-09-20T09:03:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 20, 2008, 9:03am UTC](https://www.ruby-forum.com/t/form-for-on-a-nested-singleton/149094/1 "2008-09-20T09:03:15Z")

</div>

Hello-

I have a resource for Orders with a nested singleton for Address. I  
find that is I use the form\_for syntax like this:

form\_for([@order, @address)

I get an error that says:

undefined method `order\_addresses\_path’ for #\<ActionView::Base:  
0xb6afcefc\>

if I change the form\_for syntax to look like this:

form\_for(@address, :url =\> order\_address\_path(@order))

then it starts to work. My question is, is this the expected behavior  
of form\_for or am I doing something wrong?

Regards,  
Eric
