Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after_commit is called before after_create #9

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

after_commit is called before after_create #9

dewski opened this issue Apr 1, 2013 · 2 comments

Comments

@dewski
Copy link

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
Copy link
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
Copy link
Owner

grosser commented Apr 4, 2013

please try 0.2.0 hope it's better now!

@grosser grosser closed this as completed Apr 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants