diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..37c2961c --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.7.2 diff --git a/lib/statesman/adapters/active_record.rb b/lib/statesman/adapters/active_record.rb index 5b40bb61..c93907d1 100644 --- a/lib/statesman/adapters/active_record.rb +++ b/lib/statesman/adapters/active_record.rb @@ -305,19 +305,11 @@ def mysql_gaplock_protection? end def db_true - value = ::ActiveRecord::Base.connection.type_cast( - true, - transition_class.columns_hash["most_recent"], - ) - ::ActiveRecord::Base.connection.quote(value) + transition_table.type_cast_for_database(:most_recent, true) end def db_false - value = ::ActiveRecord::Base.connection.type_cast( - false, - transition_class.columns_hash["most_recent"], - ) - ::ActiveRecord::Base.connection.quote(value) + transition_table.type_cast_for_database(:most_recent, false) end def db_null