diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-21 18:40:04 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:31:57 -0600 |
commit | 5cd9c7c6ea1ba5c6ad40799b9476145803dccba5 (patch) | |
tree | 2b21f6f51f9fb697a268f410992e7cd3e75bf570 /app/models/ci/trigger.rb | |
parent | 8df3eb6648a561e6f4695bbd78077a369aa4b48f (diff) | |
download | gitlab-ce-5cd9c7c6ea1ba5c6ad40799b9476145803dccba5.tar.gz |
Enable Rails/Validation
Diffstat (limited to 'app/models/ci/trigger.rb')
-rw-r--r-- | app/models/ci/trigger.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/trigger.rb b/app/models/ci/trigger.rb index 62889fe80d8..39a1dd86241 100644 --- a/app/models/ci/trigger.rb +++ b/app/models/ci/trigger.rb @@ -7,8 +7,8 @@ module Ci belongs_to :project, foreign_key: :gl_project_id has_many :trigger_requests, dependent: :destroy - validates_presence_of :token - validates_uniqueness_of :token + validates :token, presence: true + validates :token, uniqueness: true before_validation :set_default_values |