title: Rails 2.2.2: find_by_sql returns result set with all columns value as object of String
body: <p>I have used find_by_sql to get UNION of two tables which has some extra columns than Model which have used to call find_by_sql, </p>
  
  <p><strong>FOR EXAMPLE:</strong></p>
  
  <pre><code>class Shape &lt; ActiveRecord::Base
     # columns
     # shape_id -&gt; Integer
  end
  
  class Circle &lt; ActiveRecord::Base
     # columns
     # circle_id -&gt; Integer
     # created_at -&gt; Datetime 
     # update_at -&gt; Datetime 
  end
  
  class Square &lt; ActiveRecord::Base
     # columns
     # square_id -&gt; Integer
     # created_at -&gt; Datetime 
     # update_at -&gt; Datetime 
  end
  </code></pre>
  
  <p>I have taken UNION of circles &amp; squares using Shape model like follows:</p>
  
  <pre><code>@shapes = Shape.find_by_sql("select circle_id as id, created_at, updated_at from circles UNION select square_id as id, created_at, updated_at from squares")
  </code></pre>
  
  <p>Now, when I use @shapes to display all records with created_at and updated_at it always returned in string object like follows:</p>
  
  <pre><code>for shape in @shapes
    puts shape['id'].class.inspect # String
    puts shape['created_at'].class.inspect # String
    puts shape['updated_at'].class.inspect # String
  end
  </code></pre>
  
  <p>Now, what is best way using which I can get that all values as object of type defined in database like follows:</p>
  
  <pre><code>for shape in @shapes
    puts shape['id'].class.inspect # Integer
    puts shape['created_at'].class.inspect # DateTime
    puts shape['updated_at'].class.inspect # DateTime
  end
  </code></pre>