spree_address_book icon indicating copy to clipboard operation
spree_address_book copied to clipboard

On address update, only delete old uneditable address if new one is saved

Open dereksweet opened this issue 9 years ago • 0 comments

  • Currently if you try and update an un-editable address, and there is an error on save, the old address still gets marked as deleted. If you then exit out of address editing you will have no addresses.
  • Moved the @address.update_attribute(:deleted_at, Time.now) code within the successful save block so that the old address is only marked as deleted if the new address saves properly.

dereksweet avatar Mar 03 '15 22:03 dereksweet