Q:

How to get only the value from a Rails query

I want to get the integer value from this query in rails.
Inventory.select(:amt_sold).where(item_ID:'GXZ44', store_id:'44555222')

On my controller, I am trying to select the amount sold from my inventory and I want to get only the integer value from the amt_sold column. When I run that query, I get: 
< Inventory id: nil, amt_sold: 175.0> 

How can I just get the 175.0 value as a integer to be able to do arithmetic operations on it?  

A:

try this: 
my_int =  Inventory.where(item_ID:'GXZ44', store_id:'44555222').first.amt_sold

