diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-20 14:17:21 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-07-20 14:17:21 +0300 |
commit | c3882eb4eeba0792ffdf4773fa9283ea0a852270 (patch) | |
tree | 1351b0702840009b7769b354f0275183688c5c9e /app/models/ci/trigger_request.rb | |
parent | cf2e09a16f7906ee1a2d206d02c224026b80b69d (diff) |
Improve implementation of variables
Diffstat (limited to 'app/models/ci/trigger_request.rb')
-rw-r--r-- | app/models/ci/trigger_request.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/ci/trigger_request.rb b/app/models/ci/trigger_request.rb index fcf2b6dc5e2..fc674871743 100644 --- a/app/models/ci/trigger_request.rb +++ b/app/models/ci/trigger_request.rb @@ -7,5 +7,13 @@ module Ci has_many :builds, class_name: 'Ci::Build' serialize :variables + + def user_variables + return [] unless variables + + variables.map do |key, value| + { key: key, value: value, public: false } + end + end end end |