I want to have a parent model that I can add child objects (via a has_many association) using the rails 2.3 nested form syntax. However, it seems like rails throws an error during validation of the parent model if I have a validates_presence_of :parent_id defined in the child model. Is the only solution to this to remove the validates_presence_of :parent_id? This seems like a hack-ish workaround. -- Posted via http://www.ruby-forum.com/.
Reasonably Related Threads
- Associated child records not created on creation of a parent.
- has_many validation the Rails way
- RESTful nested resources and polymorphism?
- Validating an ActiveRecord object and its has_many :through associations
- Nested forms and deleting/removing has_many associations