given my model Page
has a visible
flag and I have the following filters
filter :name
filter :visible
accessing the Page AA shows the filters correctly. But I am not able to filter for Pages that are invisible, because leaving the checkbox untouched results in no parameter passed to meta_search. Maybe I'm missing something important here...
Yeah, that's the problem with checkboxes: there's only two possible values: on and off. For the boolean filter, off must mean "don't use this filter" otherwise it wouldn't act like all the other filters.
Instead of a checkbox we might want to have two radio buttons instead. Or maybe even three:
since we changed to ransack, we now have a checkbox with yes/no/any int that case, I think we can close this
Hi guys!
Is there a better way to make a single checkbox instead of two (with yes & no) if boolean field? I use some trick at the moment:
filter :garden, as: :check_boxes, collection: [['Garden', true]], label: ''
look at :garden case below:
Most helpful comment
Hi guys!
Is there a better way to make a single checkbox instead of two (with yes & no) if boolean field? I use some trick at the moment:
look at :garden case below: