1 class Person
< ActiveRecord
::Base
3 has_many
:posts, :through => :readers
4 has_many
:posts_with_no_comments, :through => :readers, :source => :post, :include => :comments, :conditions => 'comments.id is null'
7 has_many
:jobs, :through => :references
8 has_one
:favourite_reference, :class_name => 'Reference', :conditions => ['favourite=?', true]
9 has_many
:posts_with_comments_sorted_by_comment_id, :through => :readers, :source => :post, :include => :comments, :order => 'comments.id'