Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #509 from jgadbois/master

Look in base table before looking in slug table for slugged model
  • Loading branch information...
commit b5f3910381bc2d26a42ad7c2bb43ecae96c435ce 2 parents f0128e7 + 36cd068
@norman authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/friendly_id/history.rb
View
1  lib/friendly_id/history.rb
@@ -87,6 +87,7 @@ def exists_by_friendly_id?(id)
private
def first_by_friendly_id(id)
+ where(friendly_id_config.query_field => id).first ||
select(quoted_table_name + '.*').joins(:slugs).where(slug_history_clause(id)).first
end
Please sign in to comment.
Something went wrong with that request. Please try again.