Skip to content

Commit

Permalink
Hound
Browse files Browse the repository at this point in the history
  • Loading branch information
ceithir committed Sep 29, 2023
1 parent d600a09 commit 1f8cf81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions app/models/common_tagging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ def update_wrangler
end

def add_to_autocomplete
if filterable.is_a?(Fandom) && common_tag.eligible_for_fandom_autocomplete?
common_tag.add_to_fandom_autocomplete(filterable)
end
return unless filterable.is_a?(Fandom) && common_tag.eligible_for_fandom_autocomplete?

common_tag.add_to_fandom_autocomplete(filterable)
end

def remove_from_autocomplete
if filterable.is_a?(Fandom) && common_tag&.was_eligible_for_fandom_autocomplete?
common_tag.remove_from_fandom_autocomplete(filterable)
end
return unless filterable.is_a?(Fandom) && common_tag&.was_eligible_for_fandom_autocomplete?

common_tag.remove_from_fandom_autocomplete(filterable)
end

# A relationship should inherit its characters' fandoms
Expand Down
4 changes: 2 additions & 2 deletions app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,11 @@ def remove_from_fandom_autocomplete(fandom)
end

def eligible_for_fandom_autocomplete?
return (self.is_a?(Character) || self.is_a?(Relationship)) && canonical
(self.is_a?(Character) || self.is_a?(Relationship)) && canonical
end

def was_eligible_for_fandom_autocomplete?
return (self.is_a?(Character) || self.is_a?(Relationship))
(self.is_a?(Character) || self.is_a?(Relationship))
end

def remove_stale_from_autocomplete
Expand Down

0 comments on commit 1f8cf81

Please sign in to comment.