diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-11 12:08:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-11 12:08:10 +0000 |
commit | b86f474bf51e20d2db4cf0895d0a8e0894e31c08 (patch) | |
tree | 061d2a4c749924f5a35fe6199dd1d8982c4b0b27 /app/helpers/container_expiration_policies_helper.rb | |
parent | 6b8040dc25fdc5fe614c3796a147517dd50bc7d8 (diff) | |
download | gitlab-ce-b86f474bf51e20d2db4cf0895d0a8e0894e31c08.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/container_expiration_policies_helper.rb')
-rw-r--r-- | app/helpers/container_expiration_policies_helper.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/helpers/container_expiration_policies_helper.rb b/app/helpers/container_expiration_policies_helper.rb new file mode 100644 index 00000000000..17791e7b0ff --- /dev/null +++ b/app/helpers/container_expiration_policies_helper.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module ContainerExpirationPoliciesHelper + def cadence_options + ContainerExpirationPolicy.cadence_options.map do |key, val| + { key: key.to_s, label: val } + end + end + + def keep_n_options + ContainerExpirationPolicy.keep_n_options.map do |key, val| + { key: key, label: val } + end + end + + def older_than_options + ContainerExpirationPolicy.older_than_options.map do |key, val| + { key: key.to_s, label: val } + end + end +end |