Named scope on belongs_to

I have a Resort model and a Country model

Resort
belongs_to :country

Country
has_many :resorts

I tried and failed yesterday to develop a named_scope that would return
all the resorts but sorted by country name and then by resort name
within that country.

How do I do this?

Best

BB

mengu in #rubyonrails helped me, thanks!

Here’s the answer…works great.

named_scope :popular_by_country, :joins => :country, :conditions =>
[‘popular_resort = ?’, true], :order => ‘countries.name ASC’