Don't pass empty search parameters to URL
I have a search page with a lot of options which creates very long urls even when only one filter has been selected. Is there a way to setup ransack so empty filters won't appear in the URL? I.e getting http://kartoteky.d20.cz/fate/triky?q%5Btags_array_overlaps%5D%5B%5D=droid instead of http://kartoteky.d20.cz/fate/triky?q%5Btitle_cont%5D=&q%5Boriginal_cont%5D=&q%5Bsource_in%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Bdials_array_overlaps%5D%5B%5D=&q%5Btags_array_overlaps%5D%5B%5D=&q%5Btags_array_overlaps%5D%5B%5D=droid&q%5Btrick_type_array_overlaps%5D%5B%5D=&q%5Bactions_array_overlaps%5D%5B%5D=&q%5Brestrictions_array_overlaps%5D%5B%5D=&q%5Bcosts_array_overlaps%5D%5B%5D=&commit=Hledat when a search query is made
This is an inherent feature of HTML Form GET:
https://developer.mozilla.org/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data#on_the_client_side_defining_how_to_send_the_data
Of course, you can submit form data with the POST method.
Alternatively, you can also use JavaScript to assist in processing the form:
https://stackoverflow.com/questions/66952484/how-do-i-remove-a-parameter-with-blank-response-from-url-generated-by-the-form