Issues with filter with searchkick elastic rails
I am currently on the part where you add
<% if params[:price]==bucket["key"].to_s%>
<%= link_to bucket["key"], request.params.except(:price)%>
<% else %>
<%= link_to bucket["key"], request.params.merge(price: bucket["key"]) %>
<%end%>
but I get an error:
undefined method `merge' for []:Array
Extracted source (around line #28):
@producs = Product.search "*", where: args, aggs: {category_id: {}, price: {}, condition: {}, created_at:{}}
I've looked online but I don't see any sources for it. I would really appreciate any help!