lib/journaled/connection.rb in journaled-5.2.0 vs lib/journaled/connection.rb in journaled-5.3.0
- old
+ new
@@ -1,13 +1,13 @@
module Journaled
module Connection
class << self
def available?
- Journaled.transactional_batching_enabled && transaction_open?
+ Journaled.transactional_batching_enabled? && transaction_open?
end
def stage!(event)
- raise TransactionSafetyError, <<~MSG unless transaction_open?
+ raise TransactionSafetyError, <<~MSG unless available?
Transaction not available! By default, journaled event batching requires an open database transaction.
MSG
connection.current_transaction._journaled_staged_events << event
end