Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
inveterateliterate opened this issue Jul 11, 2022 · 0 comments · May be fixed by #132
Open

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

inveterateliterate opened this issue Jul 11, 2022 · 0 comments · May be fixed by #132

Comments

@inveterateliterate
Copy link
Contributor

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

@inveterateliterate inveterateliterate changed the title Pass in explicit truthy / falsy options to coerce with boolean parser Pass in explicit truthy / falsy options to transform with boolean parser Jul 11, 2022
@oroth8 oroth8 self-assigned this Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants