Displaying 2 results from an estimated 2 matches for "order_account".
2007 Nov 20
2
confirming that a model instance was correctly created from POST params
...ess.new(params[:billing_address])
20 @shipping_address = OrderAddress.new(params[:shipping_address])
21 end
22 @billing_address.valid?
23
24 if @use_separate_shipping_address
25 @shipping_address.valid?
26 end
27
28 @order_account = OrderAccount.new(params[:order_account])
29 @order_account.valid?
30
31 OrderUser.transaction do
32 @order_user.save!
33 Order.transaction do
34 @order = @order_user.orders.build(params[:order])
35 @order.order_number = Order...
2006 Jun 01
4
how can I control when to commit a transaction?
hello
it seems like this question has appeared a few times with no answer:
how do you get rails to issue ''write'' statements (ie ''CREATE/UPDATE'') to
the database without committing each time?
I tried setting
ActiveRecord::Base.connection.begin_db_transaction
before calling any action on my object, but as soon as
myObject.save
or
myObject.update
is called,