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 <[email protected]>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to