James Kebinger wrote:
I'm doing a find all and adding my own :order option, but whatever I
add, AR still adds another "created_at desc" to the end of the order
list. This is causing the query to blow up when created_at is ambiguous.
This is the query:
@user.notes.find(:all, :include =>
[:project],:order=>"notes.created_at").each do |note|
and the sql ends up like this:
WHERE (notes.user_id = 1) ORDER BY notes.created_at, created_at DESC)
Does the declaration of the notes association in the Order model
have a :order option?