Hi Fred,

thanks for replay.

Can you give me an example please, I'm not that good with queries.

Cheers Alex

On Apr 15, 6:34 pm, Frederick Cheung <[email protected]>
wrote:
> 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