title: Lat/Lng Coordinate variables not recognized in ActiveRecord, forced to hard code
body: <p>Hey guys I'm having the WEIRDEST issue while pairing on this rails app. We're using google maps api to grab lat and lng to do an ActiveRecord look up. For some odd reason the SomeModel.where("lat &lt;=?", neLat) will not work BUT when I print neLat to the console and then copy the number and then hard code it to that query it works perfectly! I'm so stumped. Has anyone had any issues like this before?</p>
  
  <p>This is an example of what I'm currently doing which doesn't work:</p>
  
  <pre><code>data = request.parameters
  neLat = data['neLat'].to_f
  
  @props = SomeModel.where("lat &lt;=?", neLat)
  </code></pre>
  
  <p>47.6090933689332 is the number I see in my console/ActiveRecord query.  One troubleshooting step I've taken was hard coding the number into a variable like this:</p>
  
  <pre><code>neLat = 47.6090933689332
  
  @props = SomeModel.where("lat &lt;=?", neLat)
  </code></pre>
  
  <p>I get the results I'm looking for this way, but I don't want to be hardcoding these coordinates.  Another troubleshooting step I've taken was to make sure there wasn't a conflict with the float value so I went with this: </p>
  
  <pre><code>temp = "47.6090933689332"
  neLat = temp.to_f
  
  @props = SomeModel.where("lat &lt;=?", neLat)
  </code></pre>
  
  <p>This didn't work either as it gave me the same results as the example just above.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I've provided more details as requested in the comments.  Also, I realized I wasn't as clear as I could've been in my initial question.  When I query I'm able to get my desired results back in the console, but the problem lies in the rendering of the results in my view.  Any form of hardcoding will render correctly in my view, but when I use the values from my request.parameters is where the rendering fails.  It will either render everything in the table or nothing in the table.  So in the example below I can see that I'm getting 3 different properties from my properties table, but my view will render EVERYTHING in my table, which is like 7 properties.</p>
  
  <p>Here is the raw sql query that ActiveRecord generates (this is the result of all 3 ways as I've done above):</p>
  
  <pre><code>SELECT `properties`.* FROM `properties` WHERE (lat &gt;= 47.609093368933195)
  #&lt;Property:0x007fa333ac1880&gt;
  #&lt;Property:0x007fa333ac1718&gt;
  #&lt;Property:0x007fa333ac15b0&gt;
  </code></pre>
  
  <p>As for the schema, it's just one table that I'm using and no joins.</p>