v0.13.0 - Errors with custom ID types in ActiveRecord
leifg opened this issue · 0 comments
leifg commented
We are using custom ID types for our primary keys:
class MyModel < ApplicationRecord
attribute :id, MyModelId.new
end
MyModel.find(MyModelId.new("123"))
With 0.13.0 this results in type errors when regenerating DSL RBI files:
Expected T.any(TrueClass, FalseClass, String, Symbol, ActiveSupport::Multibyte::Chars, Numeric, ActiveModel::Type::Binary::Data, ActiveRecord::Type::Time::Value, Date, Time, ActiveSupport::Duration, T::Class[T.anything]) but found MyModelId for argument args https://srb.help/7002
26 | MyModel.find(MyModelId.new("123"))
Is there anyway to support id types defined by attribute :id
?