jhund / filterrific

Filterrific is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists.
http://filterrific.clearcove.ca
MIT License
910 stars 124 forks source link

Issue with Boolean Filters in Filterrific Gem - Incorrect Handling of "False" Values #223

Open grantmca opened 1 year ago

grantmca commented 1 year ago

When passing a boolean value of false as a filter parameter from the controller, the gem treats it as non-present due to the .present? check performed during the define_and_assign_attr_accessors_for_each_filter method. As a result, the parameter isn't assigned to the attr_accessor and doesn't affect the filtering process. Is this the expected behavior of the gem? If not I could look into making a PR to address this