Nested Models Error in Rails 3?

I am supposed to use app. Build_contact_person instead of app. Contact_person.

Build In this way, it worked :).

I am supposed to use @app. Build_contact_person instead of @app. Contact_person.

Build.In this way, it worked :).

1 Hmm very strange for me.. @app. Contact_person. Build should have worked!

I have used it in similar way and it worked for me! – Saran Nov 16 '10 at 17:34.

Declaring association does not automatically creates it: class App :destroy accepts_nested_attributes_for :contact_person # Adding this line should work after_create { self. Contact_person = ContactPerson. New } end.

Yes I added your suggestion but still it is not working. I am still getting undefined method `build' for nil:NilClass when trying to view the apps/new page. – Felix Nov 16 '10 at 3:49 @Felix if you're using the after_create observer Dmytrii suggested you can remove the @app.

Contact_person. Build line from the controller. – Adam Lassek Nov 16 '10 at 3:52 @Felix, showing more information would help; including the view and call stack.

– Dmytrii Nagirniak Nov 16 '10 at 4:00 hey guys, thanks for the suggestions. I used @app. Build_contact_person and it worked – Felix Nov 16 '10 at 4:03.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions