This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/entry.rb b/app/models/entry.rb | |
index ccc375a..3ad8240 100644 | |
--- a/app/models/entry.rb | |
+++ b/app/models/entry.rb | |
@@ -75,13 +75,12 @@ class Entry < Hash | |
end | |
def similar?(rhs) | |
- if self.identity == rhs.identity | |
- similar_title?(rhs) | |
- elsif self.user_id == rhs.user_id | |
- same_origin?(rhs) | |
- else | |
- same_link?(rhs) or similar_title?(rhs) | |
+ result = false | |
+ if self.user_id == rhs.user_id | |
+ result ||= same_origin?(rhs) | |
end | |
+ result ||= same_link?(rhs) || similar_title?(rhs) | |
+ result | |
end | |
def identity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment