The following form is being used to generate results.
<%= form_tag risultati_fatturati_interventos_path do %> <div class='row'>
<div class='small-6 medium-6 large-6 columns'>
Dal: <%= date_select :intervento, :dal, { order: [:day, :month, :year], default: Date.today-31, start_year: Time.now.year-1, end_year: Time.now.year, datetime_separator: " " }, {class: "small-3 medium-3 large-3 columns"} %>
</div>
<div class='small-6 medium-6 large-6 columns'>
Al: <%= date_select :intervento, :al, { order: [:day, :month, :year], default: Date.today-30, start_year: Time.now.year-1, end_year: Time.now.year, datetime_separator: " " }, {class: "small-3 medium-3 large-3 columns"} %>
</div> </div> <div class='row'>
<div class='small-6 medium-6 large-6 columns'>
<%= collection_select(:intervento, :invoicestate_id, Invoicestate.all, :id, :nome, prompt: "tutti") %>
</div>
<div class='small-6 medium-6 large-6 columns'>
<br /><br />
<%= submit_tag "Invia" %>
</div> </div> <% end %>
The results page allow users to individually edit each record. Upon that action, the controller states redirect_to :back
so that the UI leaves the user in a known state.
However the results page is dealing with a query with no parameters. My understanding is submit button does not populate the URL with the parameters, while link_to does.
Various forms of <%= link_to "blurb", params.merge(...) %>
are not being digested by rails. How can the results page be generated with parameters in order to allow :back
to return proper results?