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

Filtering on boolean properties? #125

Open
jwilliams-t3 opened this issue May 27, 2015 · 0 comments
Open

Filtering on boolean properties? #125

jwilliams-t3 opened this issue May 27, 2015 · 0 comments

Comments

@jwilliams-t3
Copy link

I have a model that has a boolean property 'protected'. In MySql it's stored as a tinyint with a value of 0 or 1. In my serializer I would like to filter on the property so I added:

can_filter_by :protected

Unfortunately, this means the url parameter must use 0 or 1 instead of 'true' or 'false':

http://localhost:3000/v1/profiles?protected=1

Is it possible to support 'true' or 'false'?

http://localhost:3000/v1/profiles?protected=true
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

No branches or pull requests

1 participant