diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-01-09 13:06:21 -0800 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2018-01-11 09:24:59 -0800 |
commit | 1dc30595e34eac0fcfa28e0dca2b7a22c02bacc3 (patch) | |
tree | 64a95f7cd5d688633724df9b9cf2815473e03260 /app/models/route.rb | |
parent | 685780d5b4606dce440ba8121e774fd6e7884ea2 (diff) | |
download | gitlab-ce-1dc30595e34eac0fcfa28e0dca2b7a22c02bacc3.tar.gz |
Revert "Revert "Fix Route validation for unchanged path""
This reverts commit 3576d59ae95a61dd20e997a619dbc6c8e8a70276.
Diffstat (limited to 'app/models/route.rb')
-rw-r--r-- | app/models/route.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/route.rb b/app/models/route.rb index 7ba3ec06041..412f5fb45a5 100644 --- a/app/models/route.rb +++ b/app/models/route.rb @@ -8,7 +8,7 @@ class Route < ActiveRecord::Base presence: true, uniqueness: { case_sensitive: false } - validate :ensure_permanent_paths + validate :ensure_permanent_paths, if: :path_changed? after_create :delete_conflicting_redirects after_update :delete_conflicting_redirects, if: :path_changed? |