title: Searching serialized data, using active record
body: <p>I'm trying to do a simple query of a serialized column, how do you do this? </p>
  
  <pre><code>serialize :mycode, Array
  
  
  1.9.3p125 :026 &gt; MyModel.find(104).mycode
    MyModel Load (0.6ms)  SELECT `mymodels`.* FROM `mymodels` WHERE `mymodels`.`id` = 104 LIMIT 1
   =&gt; [43565, 43402] 
  1.9.3p125 :027 &gt; MyModel.find_all_by_mycode("[43402]")
    MyModel Load (0.7ms)  SELECT `mymodels`.* FROM `mymodels` WHERE `mymodels`.`mycode` = '[43402]'
   =&gt; [] 
  1.9.3p125 :028 &gt; MyModel.find_all_by_mycode(43402)
    MyModel Load (1.2ms)  SELECT `mymodels`.* FROM `mymodels` WHERE `mymodels`.`mycode` = 43402
   =&gt; [] 
  1.9.3p125 :029 &gt; MyModel.find_all_by_mycode([43565, 43402])
    MyModel Load (1.1ms)  SELECT `mymodels`.* FROM `mymodels` WHERE `mymodels`.`mycode` IN (43565, 43402)
   =&gt; [] 
  </code></pre>