summaryrefslogtreecommitdiff
path: root/app/models/route.rb
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-03 10:33:01 -0700
committerMichael Kozono <mkozono@gmail.com>2017-05-05 12:11:58 -0700
commitca5c762cf577838a98c0ba96ce20b5f1d5dafc91 (patch)
tree4c9a8c50c18e075ce9b3d0dc1fc3843bbacdf366 /app/models/route.rb
parent72872ee2136436e48ce394268fc8bfb8a2118810 (diff)
downloadgitlab-ce-ca5c762cf577838a98c0ba96ce20b5f1d5dafc91.tar.gz
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