Closed Reveren closed 8 years ago
Try removing the available_filters: []
in your recipes controller when initializing the filterrific variable. It overrides the available_filters specified in your model, and since the filter is empty you are removing all the filters that can be applied for that instance of filterrific.
That did it. It now works like a champ. Thanks.
Like the title says, I can't seem to make this work with my setup. I get no errors. When choosing an option from a select list, everything seems to go OK, along with all the AJAX, but the filter is not actually applied to the results. For instance I have a model Recipe that includes a type_id that I am filtering from. I can choose the results and from the WEBrick output the parameter gets the value, but the load doesn't have the parameters in its syntax.
Recipe model
Type model
Recipes controller
views/recipe/index.html.erb
_list.html.erb
index.js.erb
Here is the output of my WEBrick when I click an option:
As you can see, the Parameters line gets the
with_type_id => 1
but it is not carried over to the Recipe Load query. This is pretty much taken right from the website, where Students become Recipes and Country becomes Type. Am I missing something or have I just hosed it up altogether?edit: Ruby - 2.3.0 Rails - 4.2.6 Filterrific - 2.0.5