Commit d8111782f2e034c1de71a0953eaf3c69efd60b2d
1 parent
14b985ea
Exists in
master
and in
29 other branches
Only remove facets from its filter for better browsing
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
app/helpers/search_helper.rb
... | ... | @@ -83,9 +83,10 @@ module SearchHelper |
83 | 83 | id => facet[:label_id].nil? ? value : params[:facet][id].merge( facet[:label_id] => params[:facet][id][facet[:label_id]].to_a.push(value) ) |
84 | 84 | )) |
85 | 85 | else |
86 | - url = params.merge(:facet => { | |
86 | + # preserve others filters and change this filter | |
87 | + url = params.merge(:facet => params[:facet].merge( | |
87 | 88 | id => facet[:label_id].nil? ? value : { facet[:label_id] => value } |
88 | - }) | |
89 | + )) | |
89 | 90 | end |
90 | 91 | |
91 | 92 | content_tag 'div', link_to(link_label, url, :class => 'facet-result-link-label') + | ... | ... |