Created
May 16, 2010 22:01
-
-
Save sinefunc/403202 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 Join | |
def self.[](id) | |
super && db.exists(key(id, :exists)) | |
end | |
def create | |
super | |
set key(:exists), 1 | |
expire key(:exists), 300 | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment