diff options
Diffstat (limited to 'app/models/route.rb')
-rw-r--r-- | app/models/route.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/route.rb b/app/models/route.rb index 706589e79b8..fe4846b3be5 100644 --- a/app/models/route.rb +++ b/app/models/route.rb @@ -20,6 +20,7 @@ class Route < ApplicationRecord scope :inside_path, -> (path) { where('routes.path LIKE ?', "#{sanitize_sql_like(path)}/%") } scope :for_routable, -> (routable) { where(source: routable) } + scope :for_routable_type, -> (routable_type) { where(source_type: routable_type) } scope :sort_by_path_length, -> { order('LENGTH(routes.path)', :path) } def rename_descendants |