Skip to content

Commit

Permalink
Bug 744: Support scoped with STI
Browse files Browse the repository at this point in the history
  • Loading branch information
Maitreyee Pasad authored and parndt committed Jul 27, 2018
1 parent fd16e10 commit d67712e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/friendly_id/scoped.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def serialized_scope
end

def scope_for_slug_generator
relation = self.class.unscoped.friendly
relation = self.class.base_class.unscoped.friendly
friendly_id_config.scope_columns.each do |column|
relation = relation.where(column => send(column))
end
Expand Down

0 comments on commit d67712e

Please sign in to comment.