Just figured out that it needed to be:
<%= f.fields_for :user do |builder| %>
with the "<%=".
Strange why this is not in the docs
On Oct 15, 2:29 pm, Christian Fazzini
<christian.fazz...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Artist is 1:1 with User. User has_one :artist
>
> In my artist model, I have:
>
> belongs_to :user
> accepts_nested_attributes_for :user
>
> However, in my artist _form, the name column from the user model does
> not display. I am doing:
>
> <% f.fields_for :user do |builder| %>
> <p class="fields">
> <%= builder.label :name %>
> <%= builder.text_field :name %>
> </p>
> <% end %>
>
> How come?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.