Merge branch '20870-secret-variables-sorted-by-key' into 'master'

Sort secret keys by key instead of id.

Closes #20870 

See merge request !6275
This commit is contained in:
Rémy Coutable 2016-09-16 09:04:29 +00:00
commit 6c168d408a
2 changed files with 5 additions and 3 deletions

View File

@ -11,6 +11,8 @@ module Ci
format: { with: /\A[a-zA-Z0-9_]+\z/,
message: "can contain only letters, digits and '_'." }
scope :order_key_asc, -> { reorder(key: :asc) }
attr_encrypted :value,
mode: :per_attribute_iv_and_salt,
insecure_mode: true,

View File

@ -9,7 +9,7 @@
%th Value
%th
%tbody
- @project.variables.each do |variable|
- @project.variables.order_key_asc.each do |variable|
- if variable.id?
%tr
%td= variable.key