ruby on rails - How to return appropriate header for Tire search results? -
if go www.leapfm.com , make search lets "dubstep" return of dubstep songs. however, header still listed "top songs"
i'd instead change search results "dubstep" 5 when search made.
i tried hacky solution didn't work
<% if tire.search.results %> <h6>search results:</h6> <% else %> <h6>top ranked songs</h6> <% end %>
any ideas?
i'm using this gem
and
the problem more or less making "top songs" header change, , search results returning in index makes difficult.
a simple check against parameters work:
<% if params[:query].present? %> <h6>search results:</h6> <% else %> <h6>top ranked songs</h6> <% end %>
Comments
Post a Comment