Hi.

I am a newbie to Rails (and Ruby) so go easy on me.

I have a table of countries, and a table of constituent states/provinces
(connected by country_id).
I am using option_groups_from_collection_for_select (ogfcfs) to create a
drop down
list of states grouped by country. What I want is to sort the list first by
country name then within each subgroup to list the states in alphabetic
order.

Ex:

CANADA
  Alberta
  BC
  Ontario
UNITED STATES
  Arizona
  New York
  Wyoming
OTHER COUNTRY
  Region1
  Region2

I can get the countries to be sorted by simply passing something like this
as the first parameter to ogfcfs:
Country.find(:all, :order => "country_name")
However the states within each country are in whatever order the database
spits them out. How do I sort the states lists within each country?

Thanks in advance!

--
Swartz