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

array validator not accepting boolean attributes #4

Merged
merged 1 commit into from
Apr 25, 2012
Merged

array validator not accepting boolean attributes #4

merged 1 commit into from
Apr 25, 2012

Conversation

iNecas
Copy link
Member

@iNecas iNecas commented Apr 25, 2012

when having something like:

param :recursive, [true, false]

the validator fails (undefined method `TrueClass' for Kernel:Module).

Simplifying the array validator not to try typecast the values for now. Maybe
there could be some option for that in the param to enable something like this
explicitly. Implicit conversions don't fit here very well. If I say I expect a
param to be one of [1, 2, 3] I might not be happy getting string instead of integer.

when having something like:

    param :recursive, [true, false]

the validator fails (undefined method `TrueClass' for Kernel:Module).

Simplifying the array validator not to try typecast the values for now. Maybe
there could be some option for that in the param to enable something like this
explicitly. Implicit conversions don't fit here very well. If I say I expect a
param to be one of [1, 2, 3] I might not be happy getting string instead of integer.
Pajk added a commit that referenced this pull request Apr 25, 2012
array validator not accepting boolean attributes
@Pajk Pajk merged commit 5805a5a into Apipie:master Apr 25, 2012
ftsanjuan referenced this pull request in instacart/apipie-rails Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants