I'm using the most recent ruby + rails, with the filterrific gem. It works great - but how can multiple parameters per scope be used? For single column filtering it is simple, but for the following scenario, how would it be handled?
Filter by X miles of zipcode Y
Scopes currently only have knowledge of the value being modified (EITHER miles, OR zipcode - two different scopes), but neither have knowledge of the other. This filter scenario requires knowledge of miles and zipcode. I have searched the documentation thoroughly and see no way. Has anyone done this before or am I missing something hidden in the documentation?
You can use Rails'
fields_for
form helper to submit a hash with multiple keys and values to a single filterrific enabled scope:Then you can access the various values in the scope like so:
This is tested with Filterrific 1.4.2 and Rails 4.1