title: fetch mysql prepared statement as array of hashes
body: <p>I'm struggling with ruby's mysql gem and prepares statements.<br>
  I want to end up with the same as I would do with <code>each_hash</code> over the result, but it's nor supported in prepares statements.
  So I came with this horrible mess.</p>
  
  <pre><code>  stmt = @db.prepare("SELECT mat_id, name, qty FROM materials WHERE mat_id = ? ")
  
    #those 3 lines hurt my eyes
    res = stmt.execute(params[:id])
    mat_id, name, qty  =  res.bind_result(Integer, String, Integer).fetch
    @material = [mat_id: mat_id, name: name, qty: qty]
  </code></pre>
  
  <p>There has to be a better way to fetch the results and get an array of hashes.  </p>
  
  <p>A better mysql gem could be a valid answer. An ORM is NOT.</p>