diff options
Diffstat (limited to 'app/models/dependency_proxy/image_ttl_group_policy.rb')
-rw-r--r-- | app/models/dependency_proxy/image_ttl_group_policy.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/dependency_proxy/image_ttl_group_policy.rb b/app/models/dependency_proxy/image_ttl_group_policy.rb index 5a1b8cb8f1f..0dfb298a39e 100644 --- a/app/models/dependency_proxy/image_ttl_group_policy.rb +++ b/app/models/dependency_proxy/image_ttl_group_policy.rb @@ -8,4 +8,6 @@ class DependencyProxy::ImageTtlGroupPolicy < ApplicationRecord validates :group, presence: true validates :enabled, inclusion: { in: [true, false] } validates :ttl, numericality: { greater_than: 0 }, allow_nil: true + + scope :enabled, -> { where(enabled: true) } end |