On Apr 15, 8:44 am, Alex Djioev <[email protected]> wrote:

>     @group_documents =
> GroupDocument.find_all_by_group_id(params[:group_id]).paginate :page
> => params[:page], :per_page => 10, :order => '?'
>
> Problem is with order. I want to return @group_documents collection
> ordered by document.title. Something like
> :order => 'group.title asc'

You need to join the groups table, then you'll be able to order by
groups.title

Fred
>
> How is it possible?
>
> Cheers Alex

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to