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

Allow null, present and blank accept false values #370

Merged

Conversation

artm
Copy link

@artm artm commented May 11, 2014

otherwise it is difficult to have tristate filters (e.g. present,
absent, both) driven from a single simple control (e.g. select)

Fixes #353

@artm
Copy link
Author

artm commented May 12, 2014

I had to extend the predicate options convention: now arel_predicate can be a proc accepting a typecast but yet unformatted value. The latter two commits implent the actual functionality with tests. None of the tested behavior got broken.

jonatack added a commit that referenced this pull request May 12, 2014
Null, present, and blank predicates now handle false values correctly. Fixes #353.
@jonatack jonatack merged commit e9b568d into activerecord-hackery:master May 12, 2014
@jonatack
Copy link
Contributor

Thank you @artm.

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.

Null predicate with true or false
2 participants