How can i unscope all the ORDER BY
sql statemnts in rails 3?
chain.unscoped.order("id ASC")
problem that i have is that this will also drop the WHERE statements and my query is meaningless without them. something like .unscoped('order')
would be nice.
You can use the except()
method.
chain.except(:order)
I think that'll do what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With