search for: order_addresses

Displaying 3 results from an estimated 3 matches for "order_addresses".

Did you mean: order_address
2007 Nov 20
2
confirming that a model instance was correctly created from POST params
...do 34 @order = @order_user.orders.build(params[:order]) 35 @order.order_number = Order.generate_order_number 36 @order.save! 37 end 38 OrderAddress.transaction do 39 # Addresses 40 @billing_address = @order_user.order_addresses.create(params[:billing_address]) 41 @billing_address.order_id = @order.id 42 @billing_address.is_shipping = true 43 @billing_address.save! 44 if @use_separate_shipping_address then 45 @shipping_address = @order_user.order_addresses....
2007 Dec 05
9
Does mock_model''s :null_object option work?
Please understand in the following that I am making relatively minor changes to legacy (non-TDD/BDD) code in Substruct and don''t have the time to refactor nicely right now. I''m just trying to get past the untested/un-speced cruft quickly to write the spec for my new code, so I''m looking for expediency over prettiness. I''m specifying before( :each ) do
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,