Remove literal used in condition

The right syntax would have been:

`after_save :recalculate_heading_winners, if: :incompatible_changed?`

However, since the method `recalculate_heading_winners` already executes
the `if incompatible_changed?` condition, removing it keeps the intended
behaviour.
This commit is contained in:
Javi Martín
2018-12-18 20:34:29 +01:00
parent b330de01f6
commit 250b19b0d3

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