diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-12 13:33:48 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-12 13:33:48 +0300 |
commit | 74bf291c78538641bb871adf8d998bdf0f8e2508 (patch) | |
tree | b78727d98004cb5a9e958591eca25f6aabc973a1 /app/models/project_auto_devops.rb | |
parent | 5c6f40ab6e825e8d31e3bfc362e9bcce80a14dba (diff) |
Add auto devops enabled/disabled to usage ping
Diffstat (limited to 'app/models/project_auto_devops.rb')
-rw-r--r-- | app/models/project_auto_devops.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/project_auto_devops.rb b/app/models/project_auto_devops.rb index 53731579e87..7af3b6870e2 100644 --- a/app/models/project_auto_devops.rb +++ b/app/models/project_auto_devops.rb @@ -1,6 +1,9 @@ class ProjectAutoDevops < ActiveRecord::Base belongs_to :project + scope :enabled, -> { where(enabled: true) } + scope :disabled, -> { where(enabled: false) } + validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true } def variables |