Ignoring the inefficiency of the query is there an existing Rails wrapper for abstracting the differences between rand()
across databases?
MySQL:
User.first(order: 'random()')
Postgres:
User.first(order: 'rand()')
I can create my own constant RAND_STR
but was wondering if one already existed?
Please note - this is not an efficiency question
I know the query is inefficient I'm just wondering about the abstraction