On Mon, Apr 26, 2010 at 7:51 AM, Vincent Bakker <[email protected]> wrote:

> 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)

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,
-- 
Hassan Schroeder ------------------------ [email protected]
twitter: @hassan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to