RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: theandym
Site: http://theandym.com
You can do this:
@search = Product.search(params[:search]) @search.meta_sort ||= 'name.asc'
(Source: http://craiccomputing.blogspot.com/2010/10/searchlogic-versus-metasearch-and.html )
You can do this:
@search = Product.search(params[:search])
@search.meta_sort ||= 'name.asc'
(Source: http://craiccomputing.blogspot.com/2010/10/searchlogic-versus-metasearch-and.html )