Skip to content

A platform for community discussion. Free, open, simple.

REFACTOR: remove unnecessary parentheses

Régis Hanol154f503d2e99
diff --git a/app/models/post.rb b/app/models/post.rb
index 8e03538f527..8020ddbb8f5 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