How to order search results by multiple fields?
- by JustinRoR
I am using Sunspot and Will_paginate for search in my application and don't how to have my search results start out with certain ordering conditions.
The model I am searching is the UserPrice model and want my :price and :purchase_date in descending order or lowest price to highest and present date to past:
class UserPrice < ActiveRecord::Base…