From 154f503d2e99f904356b52f2fae9edcc495708fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 12 Mar 2019 17:13:21 +0100 Subject: [PATCH] REFACTOR: remove unnecessary parentheses --- app/models/post.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index 8e03538f52..8020ddbb8f 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -215,8 +215,7 @@ class Post < ActiveRecord::Base end def matches_recent_post? - post_id = $redis.get(unique_post_key) - post_id != (nil) && post_id.to_i != (id) + $redis.get(unique_post_key).to_i != id end def raw_hash