From 46fde6bd40292355ff0652ccf7d6b8985cfa4f7e Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 12 Oct 2022 16:01:13 +1100 Subject: [PATCH] Remove now unused scope --- app/models/enterprise.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index ff7355c235..f60ac4500f 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -210,16 +210,6 @@ class Enterprise < ApplicationRecord joins(:enterprise_roles).where('enterprise_roles.user_id = ?', user.id) end } - scope :relatives_of_one_union_others, lambda { |one, others| - where(" - enterprises.id IN - (SELECT child_id FROM enterprise_relationships WHERE enterprise_relationships.parent_id=?) - OR enterprises.id IN - (SELECT parent_id FROM enterprise_relationships WHERE enterprise_relationships.child_id=?) - OR enterprises.id IN - (?) - ", one, one, others) - } scope :parents_of_one_union_others, lambda { |one, others| where("