Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-03 20:33:01 +0300
committerMichael Kozono <mkozono@gmail.com>2017-05-05 22:11:58 +0300
commitca5c762cf577838a98c0ba96ce20b5f1d5dafc91 (patch)
tree4c9a8c50c18e075ce9b3d0dc1fc3843bbacdf366 /app/models/route.rb
parent72872ee2136436e48ce394268fc8bfb8a2118810 (diff)
Refactor
Diffstat (limited to 'app/models/route.rb')
-rw-r--r--app/models/route.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/route.rb b/app/models/route.rb
index e0d85ff7db7..accc423ae46 100644
--- a/app/models/route.rb
+++ b/app/models/route.rb
@@ -43,11 +43,13 @@ class Route < ActiveRecord::Base
RedirectRoute.matching_path_and_descendants(path)
end
- def create_redirect_for_old_path
- create_redirect(path_was) if path_changed?
- end
-
def create_redirect(path)
RedirectRoute.create(source: source, path: path)
end
+
+ private
+
+ def create_redirect_for_old_path
+ create_redirect(path_was) if path_changed?
+ end
end