views/companies:
<% f.fields_for :company_contact do |company_contact_form| %>
  <div class='field'>
    <%= company_contact_form.label 'Name of the responsible for marketing'
%>
    <%= company_contact_form.text_field :marketing_name %>
  </div>
<% end %>

CompaniesController:
def new
    @company = Company.new
    @company.build_company_contact
end

Company model:
has_one :company_contact, :dependent => :destroy
accepts_nested_attributes_for :company_contact


This code doesn't crash or show any error, but it just doesn't show the
CompanyContact information at the form.


On Tue, Jul 12, 2011 at 4:40 PM, Colin Law <[email protected]> wrote:

> On 12 July 2011 16:32, Rodrigo Ruiz <[email protected]> wrote:
> > And no, it doesn't work =/
>
> It is no good just saying it doesn't work, what hope has anyone here
> got of helping further if that is all the information you give?  Show
> us the modified code and the new error message you are getting.
>
> Colin
>
> --
> 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.
>
>

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