Revert "REFACTOR: remove unnecessary parentheses attempt 2 (follow-up on 154f503d)"

This reverts commit 7db2dc717e.

Commit breaks post edits for regular users.
This commit is contained in:
Guo Xiang Tan 2019-03-14 08:15:09 +08:00
parent 1c6a2262b3
commit d2a7f29595

View File

@ -215,7 +215,8 @@ class Post < ActiveRecord::Base
end
def matches_recent_post?
$redis.get(unique_post_key)&.to_i != id
post_id = $redis.get(unique_post_key)
post_id != (nil) && post_id.to_i != (id)
end
def raw_hash