ActiveRecord::ConnectionAdapters::TransactionState Ruby on Rails 5.1.2 Class ActiveRecord::ConnectionAdapters::TransactionState < Object activerecord/lib/active_record/connection_adapters/abstract/transaction.rb Methods C committed?, completed? F finalized? N new R rolledback? S set_state Constants VALID_STATES = Set.new([:committed, :rolledback, nil]) Class Public methods new(state = nil) Link Source: show | on GitHub # File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 6 def initialize(state = nil) @state = state end Instance Public methods committed?() Link Source: show | on GitHub # File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 14 def committed? @state == :committed end completed?() Link Source: show | on GitHub # File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 22 def completed? committed? || rolledback? end finalized?() Link Source: show | on GitHub # File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 10 def finalized? @state end rolledback?() Link Source: show | on GitHub # File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 18 def rolledback? @state == :rolledback end set_state(state) Link Source: show | on GitHub # File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 26 def set_state(state) unless VALID_STATES.include?(state) raise ArgumentError, "Invalid transaction state: #{state}" end @state = state end