Bit of an edge case, but:
class MyModel < ApplicationRecord
serialize :secret_hash, type:Hash, coder: JSON
encrypts :secret_hash
end
results in the following signatures:
class MyModel
sig { returns(::String) }
def secret_hash; end
sig { params(value: ::String).returns(::String) }
def secret_hash=(value); end
end
which makes sense since secret_hash is a string in the DB schema (due to being encrypted), but the type for the accessors should be T::Hash[T.untyped, T.untyped].
I can take a stab at a PR if this is something that would be accepted into Tapioca.
Bit of an edge case, but:
results in the following signatures:
which makes sense since
secret_hashis a string in the DB schema (due to being encrypted), but the type for the accessors should beT::Hash[T.untyped, T.untyped].I can take a stab at a PR if this is something that would be accepted into Tapioca.