summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-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