Hi guys,
I have a table that has a country column (:string). Now I need to group together all the countries that are in Europe.
Any ideas on how I would approach this? (quickfix wise)
Regards,
Vincent
Hi guys,
I have a table that has a country column (:string). Now I need to group together all the countries that are in Europe.
Any ideas on how I would approach this? (quickfix wise)
Regards,
Vincent
1) Add continent as an attribute to Country, access collections via named scope
2) Create a Continent model where Continent has_many countries, Country belongs_to continent
HTH,