summaryrefslogtreecommitdiff
path: root/app/models/route.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-05 19:20:12 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-01-25 13:43:15 +0200
commit52c5f9c97f20529b608f5b47a7c361383ccadb54 (patch)
treea0eef9b8f387a9cc7c401b68d44ad4ee8183774e /app/models/route.rb
parent51c4b20c48f29fe34fd1306f7a115f645eb9fb71 (diff)
downloadgitlab-ce-52c5f9c97f20529b608f5b47a7c361383ccadb54.tar.gz
Add User#nested_groups and User#nested_projects methods
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/route.rb')
-rw-r--r--app/models/route.rb3
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