Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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