I have a model that updates its results through AJAX calls and endpapping what I designated Is Search (Param [: Q]) @model = @Search. However, when an AJAX call executes this function, I get a result that does not use search terms. I want to make sure that either Is the base here, or something that is easy to do? I found the solution after a few more searches. In Then, in / model / filter , and I am trying to include the search in the mix I have added the ranks and it works just fine on the index (if I only search), but When I apply a filter, I still want to work. parameters [: Q] reach / model / filter as it was when / Model / Index was loaded (a JS solution), or when I call Filters (Ruby Solution), I use the same @search I want to be able to reach the object. / model / index , I added Rails.cach e.write ("q", parameter [: q]) . / model / filter , I said parameters [: q] = Rails.cache.read ("q") before I called @search = Model.search (Params [: q])
No comments:
Post a Comment