title: Column type of 'set' and Rails
body: <p>I am building a database of online offers. Each offer can be viewed in one or more countries, for instance an advertiser may be interested in reaching offers in the US &amp; Canada.</p>
  
  <p>The list of countries we are covering is about 50 long with each country identified with an ISO standard two letter acronym like US, CA, GB, FR, DE, etc.</p>
  
  <p>I could handle this with a HABTM table but it seems inefficient to have a long table joining offers with countries when I could simply use the 'SET' column type in MySQL &amp; Postgres (see MySQL documentation on 'SET TYPE' <a href="http://dev.mysql.com/doc/refman/5.1/en/set.html" rel="nofollow noreferrer">here</a>).</p>
  
  <p>I did try adding a column of type 'set' as follows:</p>
  
  <pre><code>  t.set :regions, :limit =&gt; ["GB","FR","DE"]
  </code></pre>
  
  <p>This throws no error <em>but</em> the field 'regions' is now missing from my object. I can't find much on Google as the word 'set' is the most commonly re-used word in the English language (140+ different uses and 6 pages in the dictionary). The only relevant article was on Rails Wiki from 2006 that is now 404-ing.</p>
  
  <p>Would appreciate any pointers and will implement a habtm in the meantime.</p>