ok so I am trying to do something like the below to order by :joins (I
know the below won’t work)…the only solution that I can fathom is
using something like find_by_sql - but I certainly would prefer a
simpler method…any suggestions?
ok so I am trying to do something like the below to order by :joins (I
know the below won’t work)…the only solution that I can fathom is
using something like find_by_sql - but I certainly would prefer a
simpler method…any suggestions?
I’m not entirely sure what you’re doing - :order has to be a valid sql
order clause, so order by any column from any of your joined tables,
or an sql expression is fine (:eg :order => “SUM(something)” should be
ok, although you might need the expression in your order clause to be
part of the select clause too).