flags: add flag cooldown test.

This commit is contained in:
evazion
2017-05-04 16:39:47 -05:00
parent 3b37bb6142
commit 31a38ea39a
3 changed files with 23 additions and 4 deletions

View File

@@ -163,8 +163,8 @@ class PostFlag < ActiveRecord::Base
end
def initialize_creator
self.creator_id = CurrentUser.id
self.creator_ip_addr = CurrentUser.ip_addr
self.creator_id ||= CurrentUser.id
self.creator_ip_addr ||= CurrentUser.ip_addr
end
def resolve!