# Nested forms, extreme weirdness

**URL:** <https://www.ruby-forum.com/t/nested-forms-extreme-weirdness/169433>\
**Category:** Rails\
**Created:** [June 3, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/nested-forms-extreme-weirdness/169433 "2009-06-03T18:13:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [June 3, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/nested-forms-extreme-weirdness/169433/1 "2009-06-03T18:13:17Z")

</div>

I took a look at nested forms a few weeks ago, played with it a bit and  
it all seemed fine. Now I need to actually use it and it’s blown up in  
my face.

I’ve got in my account.rb

```
has_many :subscriptions

```

and  
accepts\_nested\_attributes\_for :subscriptions

then in my view

```
<% form_for @account do |form| %>
etc
<% form.fields_for :subscriptions do |subscription_form| -%>
etc
<% end %>
<% end %>

```

Now here’s the really really weird thing; the nested form should be  
produced and it isn’t, but if I change the name from :subscriptions to  
anything else, then the form is produced, but of course with wrong names  
on the input fields.

Wtf am I doing wrong?

John S.

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [June 3, 2009, 7:09pm UTC](https://www.ruby-forum.com/t/nested-forms-extreme-weirdness/169433/2 "2009-06-03T19:09:21Z")

</div>

Ha! Solved it

I had to create at least one instance of a subscription for an account  
before the form would be displayed.

Why it would display the form for symbols other than :subscriptions is  
another mystery, which I don’t need to worry about.

John S.
