title: undefined method `CSBALC' for 2461:Integer when searching a live database
body: <p>I am trying to search a live database. I am narrowing down an array by doing the following:</p>
  <p><em>Narrowing down our hypothetical database to a specific location</em></p>
  <p>'''</p>
  <pre><code>u = User.find_by(location_id: 1)
  
  arry = []
  arry2 = []
  arry3 = []
  </code></pre>
  <p>'''</p>
  <p><em>Narrowing down our confirmed users in our database</em></p>
  <p>'''</p>
  <pre><code>u.each do |user| 
    if user.confirmed == true
      arry &lt;&lt; user
    end
  end
  </code></pre>
  <p>'''</p>
  <p><em>arry looks something like this</em></p>
  <p>'''</p>
  <pre><code>arry = [#&lt;User id: 1, CUST: &quot;12345&quot;, NAME: &quot;COMP&quot;, CURBAL: &quot;999.99&quot;, BAL30: &quot;&quot;, BAL60: &quot;0.0&quot;, BAL90: &quot;0.0&quot;, location_id: 1&gt;, #&lt;User id: 2, CUST: &quot;67890&quot;, NAME: &quot;MACHINE&quot;, CURBAL: &quot;7.0&quot;, BAL30: &quot;0.0&quot;, BAL60: &quot;0.0&quot;, BAL90: &quot;0.0&quot;, location_id: 1&gt;]
  </code></pre>
  <p>'''</p>
  <p><em>Now I try to compare the CURBAL in arry using a BOOLEAN.</em></p>
  <p>'''</p>
  <pre><code>arry.each do |user|
    if user.CURBAL.to_f &gt;= 249.67
      arry2 &lt;&lt; user.id
    end
  end
  </code></pre>
  <p>'''</p>
  <p><em>I get this message when trying</em></p>
  <p>'''</p>
  <pre><code>Traceback (most recent call last):
          3: from (irb):138
          2: from (irb):138:in `each'
          1: from (irb):139:in `block in irb_binding'
  NoMethodError (undefined method `CURBAL' for 2461:Integer)
  </code></pre>
  <p>'''</p>
  <p><em>I can't seem to figure it out. The result I am looking for needs to look something like this from the previous code:</em></p>
  <p>'''</p>
  <pre><code>arry2 = [&quot;12345&quot;]
  </code></pre>
  <p>'''</p>
  <p>Any help with this would be greatly appreciated!</p>