I am trying to make methods for sorting desc
and asc
. I am using rails, tire gem and elasticsearch. I am trying to figure out what sort params I can send in the URL
So I have defined in the search-block that it is sorting the result desc order.
sort { by :price, "desc"}
When a user search for apartments in: new-york the result is sort desc order.
The search query/URL looks like this:
http://localhost:3000/apartmens?utf8&query=newyork
Why cant I add a sort-params in the url, like this:
http://localhost:3000/apartmens?utf8&query=newyork&sort=asc