Sometimes it's comforting to know your method is called within a transaction.
if Thread.current['open_transactions'].nil? ||
Thread.current['open_transactions'] == 0
will do. Any better idea?
Sometimes it's comforting to know your method is called within a transaction.
if Thread.current['open_transactions'].nil? ||
Thread.current['open_transactions'] == 0
Posted by
Yi Wen
at
3:15 PM
Labels: Ruby on Rails, transaction
No comments:
Post a Comment