Chris Abad wrote:
Wonderful... transactions did the trick!
As long as things are dependent on account.save and user.save, why not just put it all under the one transaction?
@account = Account.new(params[:account])
@user = User.new(params[:user])
Account.transaction do
if @account.save and @user.save
@account.users << @user
# Do something cool
end
end
--Steve
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
