-
-
Save sinefunc/aa32743158857b3fa4b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def delete | |
if super | |
poster.decrement_spending(price) | |
Item.db.decrby(Item.key(:total_spending), price) | |
Popular.delete(self) | |
tags.each { |name| Tag.named(name).items.delete(self) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment