Closed jcoyne closed 3 years ago
Nilify has been deprecated in https://github.com/apotonick/disposable/pull/78
However, the proposed new way of doing this in that PR (e.g. property :unicorn_name, type: Types::Nil | Types::String) does not cast empty strings to nil.
property :unicorn_name, type: Types::Nil | Types::String
Is there a recommended way to do this now? Or should nillify be undeprecated?
It looks like type: Dry::Types["params.nil"] | Dry::Types['string'] is probably the way.
type: Dry::Types["params.nil"] | Dry::Types['string']
Nilify has been deprecated in https://github.com/apotonick/disposable/pull/78
However, the proposed new way of doing this in that PR (e.g.
property :unicorn_name, type: Types::Nil | Types::String
) does not cast empty strings to nil.Is there a recommended way to do this now? Or should nillify be undeprecated?