summaryrefslogtreecommitdiff
path: root/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-11-17 20:27:16 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-11-18 01:01:53 +0800
commit9ac0c76b78cd04b2505924f003dd720a0f155959 (patch)
tree67af1f0be0b9d6b5fc42b27c5afe5516e2c7574c /lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
parent0af35d7e30e373b885bfddb30b14718d72d75ab0 (diff)
downloadgitlab-ce-9ac0c76b78cd04b2505924f003dd720a0f155959.tar.gz
Use StrongMemoize and enable/disable cops properly
Diffstat (limited to 'lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb')
-rw-r--r--lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb b/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
index 6959fa74293..9ae1f66a182 100644
--- a/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
+++ b/lib/gitlab/database/rename_reserved_paths_migration/v1/migration_classes.rb
@@ -3,11 +3,10 @@ module Gitlab
module RenameReservedPathsMigration
module V1
module MigrationClasses
- # rubocop:disable Cop/ModuleWithInstanceVariables
module Routable
def full_path
if route && route.path.present?
- @full_path ||= route.path
+ @full_path ||= route.path # rubocop:disable Cop/ModuleWithInstanceVariables
else
update_route if persisted?
@@ -31,7 +30,7 @@ module Gitlab
def prepare_route
route || build_route(source: self)
route.path = build_full_path
- @full_path = nil
+ @full_path = nil # rubocop:disable Cop/ModuleWithInstanceVariables
end
end