title: Pushing Key-Value Pairs into a Hash
body: <p>I am trying to push keys and values into a hash as I iterate through some params passed into my controller. The snipper of code below creates an array of hashes, but I want hashes with multiple key value pairs. How do I do this?</p>
  
  <pre><code> @diff_attr = []
   params[place_type].each_pair do |k, v|
     @diff_attr &lt;&lt; {k.to_sym=&gt;v}
   end
  </code></pre>
  
  <p>I should change my @diff_attr to be a hash: <code>@diff_attr = { }</code>, but after this, I'm not sure how to pass the key and value inside my iterating block.</p>
  
  <p>Currently, if I <code>puts @diff_attr</code>, I get something like:</p>
  
  <p><code>{:name =&gt; "blah blah"}, {:age =&gt; "24"}</code></p>
  
  <p>but I want something more like:</p>
  
  <p><code>{:name=&gt;"blah blah", :age=&gt;"24"}</code></p>