Skip to content

Commit

Permalink
Making sure transaction pointer is never nil when used, and updating …
Browse files Browse the repository at this point in the history
…to v1.0.5
  • Loading branch information
pat committed Nov 25, 2009
1 parent 017859c commit 7eb2d33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.4
1.0.5
4 changes: 2 additions & 2 deletions after_commit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{after_commit}
s.version = "1.0.4"
s.version = "1.0.5"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Muerdter", "David Yip", "Pat Allan"]
s.date = %q{2009-11-25}
s.date = %q{2009-11-26}
s.description = %q{
A Ruby on Rails plugin to add an after_commit callback. This can be used to trigger methods only after the entire transaction is complete.
}
Expand Down
2 changes: 2 additions & 0 deletions lib/after_commit/connection_adapters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ def transaction_pointer
end

def increment_transaction_pointer
Thread.current[:after_commit_pointer] ||= 0
Thread.current[:after_commit_pointer] += 1
end

def decrement_transaction_pointer
Thread.current[:after_commit_pointer] ||= 0
Thread.current[:after_commit_pointer] -= 1
end
end
Expand Down

0 comments on commit 7eb2d33

Please sign in to comment.