search for: update_address

Displaying 1 result from an estimated 1 matches for "update_address".

Did you mean: update_addresses
2007 Nov 21
0
Testing transactional updates in story runner
How do you guys test transactional updates with story runner? I have an action that needs to update four different models: Enrollment.transaction do @contact.update_addresses(params[:contact_address], params [:billing_address]) @enrollment.update_attributes!(params[:enrollment]) end The last update_attributes! will raise ActiveRecord::RecordNotValid if anything was invalid (it cascades to contact and further to addresses), and thus cause a rollback,...