Skip to content

Commit

Permalink
fix: history not using parse_friendly_id
Browse files Browse the repository at this point in the history
  • Loading branch information
manafire committed Nov 11, 2023
1 parent a72fac9 commit 7c09f01
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 7c09f01

Please sign in to comment.