From 4e17879930c960c26beabb787297a470a1e8199c Mon Sep 17 00:00:00 2001 From: Maitreyee Pasad Date: Wed, 27 Apr 2016 16:57:58 -0400 Subject: [PATCH] Bug 744: Support scoped with STI --- lib/friendly_id/scoped.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/friendly_id/scoped.rb b/lib/friendly_id/scoped.rb index c8273871a..5aca3ced3 100644 --- a/lib/friendly_id/scoped.rb +++ b/lib/friendly_id/scoped.rb @@ -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