I am using the gem metasearch to provide some sorting features. The page is defaulting to a sort of created_at ASC
, but I want it to be created_at DESC
, but I can't explicitly state that because it will override MetaSearch's sort features.
def index
@search = Photo.search(params[:search])
end
Any thoughts on how to achieve this?
Try this approach. It works for me: