Skip to content

Commit

Permalink
Fix: history not using parse_friendly_id (#1020)
Browse files Browse the repository at this point in the history
Fixes #1019
  • Loading branch information
manafire authored Nov 13, 2023
1 parent ecfe968 commit fe3310b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/friendly_id/history.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ module FinderMethods
include ::FriendlyId::FinderMethods

def exists_by_friendly_id?(id)
super || joins(:slugs).where(slug_history_clause(id)).exists?
super || joins(:slugs).where(slug_history_clause(parse_friendly_id(id))).exists?
end

private

def first_by_friendly_id(id)
super || slug_table_record(id)
super || slug_table_record(parse_friendly_id(id))
end

def slug_table_record(id)
Expand Down

0 comments on commit fe3310b

Please sign in to comment.