summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 12:16:00 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-12 12:42:27 +0200
commit0aefeeb882b40d740b80f15ac6610a88a340d30b (patch)
tree5dcf22ccfd0b7222529f6d74b3e05c2dc2fb2493 /app/models
parent7ef156a24292f98d89bc424cc245f00548831863 (diff)
downloadgitlab-ce-0aefeeb882b40d740b80f15ac6610a88a340d30b.tar.gz
Add Commit Status documentation
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/commit.rb2
-rw-r--r--app/models/commit_status.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb
index 042a68681bb..623ff619c49 100644
--- a/app/models/ci/commit.rb
+++ b/app/models/ci/commit.rb
@@ -136,7 +136,7 @@ module Ci
latest_statuses = statuses.latest.to_a
latest_statuses.reject! { |status| status.try(&:allow_failure?) }
- latest_statuses.select! { |status| status.ref == nil || status.ref == ref } if ref
+ latest_statuses.select! { |status| status.ref.nil? || status.ref == ref } if ref
if latest_statuses.none?
return 'skipped'
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index de7b29a649d..a4896a76316 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -5,7 +5,7 @@ class CommitStatus < ActiveRecord::Base
belongs_to :user
validates :commit, presence: true
- validates :status, inclusion: {in: %w(pending running failed success canceled)}
+ validates :status, inclusion: { in: %w(pending running failed success canceled) }
validates_presence_of :name