> I am new to rails, And stuck in this problem from last two days I have a 
student and student_parent model they have a *one-to-many* relationship i 
want to *build database attribute through one object from form to datase*.

Hi Tushar,

Your controller does not have to only speak to the Student model. You could 
have it also create the StudentParent entries from the information you got 
submitted by the form. Once you verify that the Student object and the 
StudentParent object saved successfully you would return true. A failure in 
either you would return false with the error that caused the failure.

Thanks,
Bryan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/2074c127-0872-4014-a578-37f022b52a75%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to