Created
May 31, 2013 19:55
-
-
Save bplexico/5687565 to your computer and use it in GitHub Desktop.
Extract mark_invite_redeemed
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
if mark_invite_redeemed == 1 | |
... | |
private | |
def mark_invite_redeemed | |
Invite.update_all('redeemed_at = CURRENT_TIMESTAMP', | |
['id = ? AND redeemed_at IS NULL AND created_at >= ?', invite.id, SiteSetting.invite_expiry_days.days.ago]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment