So, I have the following scope in my Photo model:
scope :best, order(:average_rating.desc)
The only problem is, the ratings were added to t
Well, I never found an approach that would work across DB drivers, so I just forced the value of all the records that were previously nil to be zero. That solved it for me, although it was a bit brutish. When the timer runs out I'll accept this since it is the solution I used, but if anyone revisits this and wants to provide an alternative answer in the future I'll be happy to accept a different answer later on.