method
add_order_by_for_association_limiting!
add_order_by_for_association_limiting!(sql, options)
public
ORDER BY clause for the passed order option.
PostgreSQL does not allow arbitrary ordering when using DISTINCT ON, so we work around this by wrapping the sql as a sub-select and ordering in that query.


