Sort by sql question

if I do a pagination: @document_pages, @documents = paginate :documents, :per_page => 20, :include => [:company], :conditions => "doc_type_id = '#{@doc_type}'", :order => "#{order_by}"

How could I sort by doc_type.title?

Thanks, Ben Lisbakken

Hey thanks for the tips on sql injection! Didn't realize that was happening!

With the join, would I still use the :include? What would the syntax look like?

Thanks again, Ben