How to change the header when a search is submitted?
I'm using the Tire gem for search, and when I do a search query the header
(top songs) stays the same. I'd like it to be Search results instead.
I've been fooling around with the following code with no luck:
<% if Tire.search.results %>
<h6>Search results:</h6>
<% else %>
<h6>Top ranked songs</h6>
<% end %>
The above code makes the header 'Search results' even if no one has made a
search query.
No comments:
Post a Comment