Searching the 'net, I found that I should use :include
, but that does not seem to change the SQL query that is generated:
def Post #model
default_scope :order => 'created_at DESC', :include => :author
end
With or without the :include
, the SQL is the same (i.e. it is only selecting from the posts table).
What is the way to do this?