[LRUG] Binding the creation of 2+ objects together
Matthew Westcott
matthew.westcott at torchbox.com
Thu Jul 31 10:07:25 PDT 2008
On 31 Jul 2008, at 19:04, Anthony Green wrote:
I'm seeing this is pattern repeated where an object with a has_one
relationship to a twin is created but you need to check its twin has created
as well and that both will save. You can't create one entry in a table
without a corresponding entry in a different table.
validates_associated ?
(I'm not a huge fan of validates_associated though - any error message it
generates will tend to be fairly vague - or worse, something like "Person is
invalid"...)
- Matt
More information about the Chat
mailing list