Using elastic search with searchkick on a rails 4 app.
I would like the input(query) the user types into the search box to stay there after the submit button is clicked and the page is redirected. Every page of my app has a search bar so keeping the users input in the box would be great. As of now the search box clears after submitting.
Having some trouble doing this. Have tried a few different methods but nothing is working. Here is my search bar view:
<%= form_tag articles_path, method: :get do %>
<p>
<%= text_field_tag :query, params[:query], style:"width:550px; height:34px;", :autofocus => true, class: "form-control" %><br>
<%= submit_tag "Let's Find Out!", :name => nil, class: "btn btn-default", style: "margin-top:6px; margin-right: 10px;" %><%= submit_tag "Most Popular", :name => nil, class: "btn btn-default", style: "margin-top:6px; margin-left: 10px;" %>
</p>
<% end %>
Any suggestions would be greatly appreciated.
A couple quick suggestions: