diff options
Diffstat (limited to 'app/models/route.rb')
-rw-r--r-- | app/models/route.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/route.rb b/app/models/route.rb index ebd18dce737..dd171fdb069 100644 --- a/app/models/route.rb +++ b/app/models/route.rb @@ -15,8 +15,9 @@ class Route < ActiveRecord::Base # rubocop:disable Rails/FindEach Route.where('path LIKE ?', "#{path_was}/%").each do |route| # Note that update column skips validation and callbacks. - # We need this to avoid recursive call of rename_children method + # We need this to avoid recursive call of rename_descendants method route.update_column(:path, route.path.sub(path_was, path)) end + # rubocop:enable Rails/FindEach end end |