summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-13 14:12:00 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-13 14:12:00 +0100
commite16fba6726adcf7e82862336fab22c6c6baf2010 (patch)
treee4fc892dfa5e06cf4f5e8852b22663f3b091ebbe /app/models
parent937e7f9e9669d4939cd6c5055a90339ff79d216b (diff)
downloadgitlab-ce-e16fba6726adcf7e82862336fab22c6c6baf2010.tar.gz
Improve how we handle persistent runner variables
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/variable.rb4
-rw-r--r--app/models/concerns/has_variable.rb6
2 files changed, 1 insertions, 9 deletions
diff --git a/app/models/ci/variable.rb b/app/models/ci/variable.rb
index 51389fb82bf..7c71291de84 100644
--- a/app/models/ci/variable.rb
+++ b/app/models/ci/variable.rb
@@ -12,9 +12,5 @@ module Ci
}
scope :unprotected, -> { where(protected: false) }
-
- def to_hash
- { key: key, value: value, public: false }
- end
end
end
diff --git a/app/models/concerns/has_variable.rb b/app/models/concerns/has_variable.rb
index 3c29e12ad71..8a241e4374a 100644
--- a/app/models/concerns/has_variable.rb
+++ b/app/models/concerns/has_variable.rb
@@ -20,12 +20,8 @@ module HasVariable
super(new_key.to_s.strip)
end
- def to_hash
- { key: key, value: value, public: false }
- end
-
def to_runner_variable
- to_hash
+ { key: key, value: value, public: false }
end
end
end