You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two models. The first model's after_commit callback updates second model. And then the second model has an after_commit callback that is fired on update. Everything works fine in development but in test environment the second model's callback is never fired. To verify this, I changed the after_commit :test, :if => :persisted? to after_save :test in the second model and then everything works fine in test environment.
The text was updated successfully, but these errors were encountered:
I have two models. The first model's
after_commit
callback updates second model. And then the second model has anafter_commit
callback that is fired on update. Everything works fine in development but in test environment the second model's callback is never fired. To verify this, I changed theafter_commit :test, :if => :persisted?
toafter_save :test
in the second model and then everything works fine in test environment.The text was updated successfully, but these errors were encountered: