Rails 3 association with order by field with belongs to relation

Hi,
I have three model subject, document_types and document.

class Subject < AR
     has_many :documents
end

class DocumenType < AR
    has_many :documents
end

class Document < AR
   belongs_to :subject
   belongs_to :document_types
end

I need to list all the documents under a subject order by

document_type’s start_date.
What is exact syntax I will use in this association to solve this
problem.

Thanks in advance.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs