diff options
Diffstat (limited to 'app/models/route.rb')
-rw-r--r-- | app/models/route.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/app/models/route.rb b/app/models/route.rb index 12b2d5c5bb2..2f6b0a8e8f1 100644 --- a/app/models/route.rb +++ b/app/models/route.rb @@ -13,7 +13,6 @@ class Route < ApplicationRecord presence: true, uniqueness: { case_sensitive: false } - before_validation :delete_conflicting_orphaned_routes after_create :delete_conflicting_redirects after_update :delete_conflicting_redirects, if: :saved_change_to_path? after_update :create_redirect_for_old_path @@ -71,13 +70,4 @@ class Route < ApplicationRecord def create_redirect_for_old_path create_redirect(path_before_last_save) if saved_change_to_path? end - - def delete_conflicting_orphaned_routes - conflicting = self.class.iwhere(path: path) - conflicting_orphaned_routes = conflicting.select do |route| - route.source.nil? - end - - conflicting_orphaned_routes.each(&:destroy) - end end |