I have GroupDocument model with following fields:
enum_attr :status, %w(pending approved banned)
Document has fields like ‘title’ or ‘author’. On controller index I
=> 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’
How is it possible?