I have users and companies tables where users belongs_to companies.
@company = Company.new(params[:company])
@user = User.new(params[:company])
@user.company = @company
if @user.valid? and @company.valid?
How can I make this into a transaction? Is this a candidate for a
If so, from what I understand from the API, I’d have to do:
which is apparently unsafe. Or should I do this in SQL? Help!