Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dereksweet
Copy link

  • 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant