after_commit is called before after_create #9

Closed
dewski opened this Issue Apr 1, 2013 · 2 comments

Projects

None yet

2 participants

@dewski
dewski commented Apr 1, 2013

after_commit should be called after after_create, but in my tests it's the other way around.

should "test after_commit" do
  Job.after_create { puts "after_create" }
  Job.after_commit { puts "after_commit" }
  @job = Job.make!
end

after_commit
after_create
@grosser
Owner
grosser commented Apr 2, 2013

Hmm could be tests not running in outer transaction or the transaction counter being off for some other reason, can you try to place a few puts in test_after_commit.rb and see why it fires early / what state it has before firing.
Alternatively a failing test case would be great!

@grosser
Owner
grosser commented Apr 4, 2013

please try 0.2.0 hope it's better now!

@grosser grosser closed this Apr 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment