Merge pull request #3313 from consul/backport-fix_literal_as_condition

Fix literal as condition
This commit is contained in:
Javier Martín
2019-02-18 18:58:47 +01:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -30,6 +30,9 @@ Layout/TrailingBlankLines:
Layout/TrailingWhitespace:
Enabled: true
Lint/LiteralAsCondition:
Enabled: true
Lint/UselessAssignment:
Enabled: true

View File

@@ -95,7 +95,7 @@ class Budget
scope :for_render, -> { includes(:heading) }
before_save :calculate_confidence_score
after_save :recalculate_heading_winners if :incompatible_changed?
after_save :recalculate_heading_winners
before_validation :set_responsible_name
before_validation :set_denormalized_ids