Hello All,
I shot a find query to include certain models in rails but i want to order the included models by my custom criterion. I have shot the query like the following to fetch the qualifications associated with the user ordering the qualifications by the start_date:
@user = User.find @current_user.id, :include => [:profile, {:qualifications=>{:order=>'start_date DESC'}}]
But when i run this in rails, it says that it can't find association named order. Any help is appreciated.
Thanks.