lib/ownership/global_methods.rb in ownership-0.1.2 vs lib/ownership/global_methods.rb in ownership-0.2.0
- old
+ new
@@ -20,10 +20,10 @@
Ownership.around_change.call(owner, block)
else
block.call
end
rescue Exception => e
- e.owner = owner
+ e.owner ||= owner
raise
end
ensure
Thread.current[:ownership_owner] = previous_value
end