Skip to content

Pass in explicit truthy / falsy options to transform with boolean parser #131

@inveterateliterate

Description

@inveterateliterate

Feature Description

Suggested Solution

Checkboxes come in as "0" and "1" - both of which are truthy. The boolean decanter makes an explicit call out for this: https://github.com/LaunchPadLab/decanter/blob/main/lib/decanter/parser/boolean_parser.rb#L10 to coerce those values into expected results from the UX.

There may be other version of truthy or falsy values in the UX (e.g., "yes", "no", etc. Would be nice to able to indicate that with decanter

Alternatives Considered / Existing Workarounds

  • transforming those values prior to decanting

Additional Context

How we got here: #127

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions