REFACTOR: remove unnecessary parentheses

REFACTOR: remove unnecessary parentheses

diff --git a/app/models/post.rb b/app/models/post.rb
index 8e03538..8020ddb 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

GitHub sha: 154f503d

I had to revert this because it was causing specs to fail.

2 Likes

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

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