Sha256: ff5aab63276d4b10088924e7be5e227e7202a47eda6fb2bd2dff0fa4213c2445

Contents?: true

Size: 596 Bytes

Versions: 7

Compression:

Stored size: 596 Bytes

Contents

# frozen_string_literal: true

module Statesman
  module Adapters
    module TypeSafeActiveRecordQueries
      def configure_state_machine(args = {})
        transition_class = args.fetch(:transition_class)
        initial_state = args.fetch(:initial_state)

        include(
          ActiveRecordQueries::ClassMethods.new(
            transition_class: transition_class,
            initial_state: initial_state,
            most_recent_transition_alias: try(:most_recent_transition_alias),
            transition_name: try(:transition_name),
          ),
        )
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
statesman-12.1.0 lib/statesman/adapters/type_safe_active_record_queries.rb
statesman-12.0.0 lib/statesman/adapters/type_safe_active_record_queries.rb
statesman-11.0.0 lib/statesman/adapters/type_safe_active_record_queries.rb
statesman-10.2.3 lib/statesman/adapters/type_safe_active_record_queries.rb
statesman-10.2.2 lib/statesman/adapters/type_safe_active_record_queries.rb
statesman-10.2.1 lib/statesman/adapters/type_safe_active_record_queries.rb
statesman-10.2.0 lib/statesman/adapters/type_safe_active_record_queries.rb