Flowdock
method

set_state

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: TransactionState

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.2.3) is shown here.

set_state(state) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 43
      def set_state(state)
        ActiveSupport::Deprecation.warn(          The set_state method is deprecated and will be removed in          Rails 6.0. Please use rollback! or commit! to set transaction          state directly..squish)
        case state
        when :rolledback
          rollback!
        when :committed
          commit!
        when nil
          nullify!
        else
          raise ArgumentError, "Invalid transaction state: #{state}"
        end
      end
Register or log in to add new notes.