So I have one form that submits information to create 2 models (A, B).
I need the ID of model A to be inserted into model B. But the ID isn't
created until it hits the database (auto_increment). But if for some
reason either item cannot be created or saved I want to abort the
whole operation.
I can handle building two models from 1 form. It's getting the id from
the first saved model and inserting it in the second and rolling back
the whole transaction if anything goes wrong that is the problem.
This is what I came up with I was looking for some feedback. It works
fine but I figure I might be doing something long winded. This is my
first go at an actual railsApp other then book demos. Any feedback
would be nice!