title: Rails 5: unable to retrieve hash values from parameter
body: <p>I'm running into a strange issue.</p>
  
  <pre><code>undefined method `values' for #&lt;ActionController::Parameters:0x007fb06f6b2728&gt;
  </code></pre>
  
  <p>is the error I get, when I assign a variable to a param hash, and try to get it's values. </p>
  
  <pre><code>attributes = params[:line_item][:line_item_attributes_attributes] || {}
  attributes.values
  </code></pre>
  
  <p>the parameter looks like this a hash of hashes:</p>
  
  <pre><code>{"0"=&gt;{"product_attribute_id"=&gt;"4"}, "1"=&gt;{"product_attribute_id"=&gt;"7"}}
  </code></pre>
  
  <p>now when I do this in console and assign that to a variable attributes it works flawlessly. So I'm struggling to understand what isn't working here - and how to make it work.</p>