title: Ruby on Rails: hash.each {} issues
body: <p>Here is my code:</p>
  
  <pre><code>records_hash = records[:id].inject({}) { |result,h|
    if result.has_key?(h)
      result[h] += 1
    else
      result[h] = 1
    end
    result
  }
  
  @test2 = records_hash.each{|key,value| puts "#{key} is #{value}"}
  </code></pre>
  
  <p>My output should look like this:</p>
  
  <pre><code>bozo is 3
  bubba is 4
  bonker is 5
  </code></pre>
  
  <p>But it renders on the page (<code>&lt;%= @test2 %></code>) as this:</p>
  
  <pre><code>bozo3bubba4bonker5
  </code></pre>
  
  <p>I've tried .each_key &amp; .each-value with similar blocks and they all return the same string above.  I run the same code in IRB and it works as expected.</p>
  
  <p>What am I doing wrong?</p>