Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
run_callbacks example
def destroy(mode=:soft)
run_callbacks :destroy do
if mode == :hard
super()
else
update(deleted_at: Time.zone.now)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.