I have a method in model that calls after create
after_create :generate_insurer_recovery_invoice, if: :insurance_recovery_batch?
How should I write another condition within this callback?
You can also do this for a shorter readable version
after_save :update_offices_people_count, if: -> {office_id_changed? || trashed_changed?}
P.S: ->
is a shorthand version of writing lambda
.