I have a model A with an after_commit callback on create and update.
class A < ApplicationRecord
after_commit :update_xyz, on: [:create, :update]
end
A rake task is in this use case. My rake task tries to create a number of model A records, but have to skip this update_xyz callback.
Is it possible to skip these callbacks while creating records? I would prefer not to add additional gems/plugins for this.