I'm on rails 3.0.8 and trying to use the after_commit callback.
It's defined here: https://github.com/rails/rails/blob/v3.0.8/activerecord/lib/active_record/transactions.rb#L210
It's mentioned as one of the callbacks here: https://github.com/rails/rails/blob/v3.0.8/activerecord/lib/active_record/callbacks.rb#L22
Consider this:
class Car < ActiveRecord::Base
after_commit do
# this doesn't execute
end
after_commit :please_run
def please_run
# nor does this
end
end
Any ideas why it doesn't work? I assume I'm using it correctly.