Hello!

I have a simple form with a nested attribute (has_one association). Is
works has expected on the new and create actions, the nested attribute
is correctly added in the database.
But when I am on the edit action the nested attributes fields are
empty...
and I am using the same partial for the form.

Am I missing something? Why I don't get the nested fields displayed?

  <% form.fields_for :address do |address| %>
    <% field do %>
      <%= label_tag "advert_address_address", t(:address, :scope =>
[:activerecord, :attributes, :address]), :class => :label  %>
      <%= address.text_field :address %>
      <%= address.hidden_field :lat %>
      <%= address.hidden_field :lng %>
    <% end %>
  <% end %>

Greg

-- 
Posted via http://www.ruby-forum.com/.

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