I'm working with Ruby on rails 2.3.8 and the idea is to implement a "Sort" functionality for search results.
I've got the view(this is a part of it):
<span>Sort by:</span> <%= link_to 'MORE RELEVANT', search_filter_relevance_path %>
Routes file:
map.search_filter_relevance "/anuncios/search_filter_relevance", :controller => 'announcements', :action => 'search_filter_relevance'
and the controller's action(doing nothing so far):
def search_filter_relevance
raise params.inspect
end
As its a search of announcements, I'd like to pass the collection of its results to the controller's action so it filters them, and not all the announcements.
How can I do that?