Add and apply Rails/ActiveRecordCallbacksOrder rule

We were already following it most of the time.
This commit is contained in:
Javi Martín
2021-08-09 22:06:03 +02:00
parent 33c962c63c
commit 8d47acc12b
2 changed files with 6 additions and 3 deletions

View File

@@ -214,6 +214,9 @@ Performance/EndWith:
Performance/StartWith:
Enabled: true
Rails/ActiveRecordCallbacksOrder:
Enabled: true
Rails/CreateTableWithTimestamps:
Enabled: true
Exclude:

View File

@@ -112,11 +112,11 @@ class Budget
where("budget_valuator_group_assignments.valuator_group_id = ?", valuator_group_id)
end
before_create :set_original_heading_id
before_save :calculate_confidence_score
after_save :recalculate_heading_winners
before_validation :set_responsible_name
before_validation :set_denormalized_ids
before_save :calculate_confidence_score
before_create :set_original_heading_id
after_save :recalculate_heading_winners
def comments_count
comments.count