I am trying to add an "any" section to my game filters. In a wide view it works fine I just reload the page passing the link the other needed params like this:
<%= link_to games_path difficulty: params[:difficulty], category: params[:category] do %>
<div class="game-type-select-content-item">
<h3>Any</h3>
</div>
<% end %>
However, in my mobile view, I'm using a form_with helper:
<%= form_with url: "/games", method: :get, local: true, data: {target: "game-filters.form"} do |f| %>
<%= f.label :language, "Language:", :class => "font-bold" %>
<%= f.select(:language, options_for_select(Language.all.pluck(:name, :language_code), selected: params[:language]), {}, {data: {action: "change->game-filters#submit"}}) %>
<%= f.label :difficulty, "Difficulty:", :class => "font-bold" %>
<%= f.select(:difficulty, options_for_select(Game.difficulties.keys, selected: params[:difficulty]), {}, {data: {action: "change->game-filters#submit"}}) %>
<%= f.label :category, "Category:", :class => "font-bold" %>
<%= f.select(:category, options_for_select(Game.categories.keys, selected: params[:category]), {}, {data: {action: "change->game-filters#submit"}}) %>
<% end %>
Is there a way to give each option an "any", that doesn't reset the other functions??