On 9 April 2010 19:25, Brent <[email protected]> wrote: > I have 3 models here setup like thus: > > AttachmentType > has_many :attachments > > Attachment > belongs_to :page > belongs_to :attachment_type > > Page > has_many :attachments > > How can I find all AttachmentType by a page id? >
Page has_many :attachments has_many :attachment_types :through => :attachments -- 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.

