On 1 Oct 2008, at 10:59, Gu stav wrote:
>
> But I know that it should work, since there is a match in the table,
> with an id of 4:
>
> @city_debug = City.find(4)
> => #<City id: 4, name: "goteborg", lng: 11.967, lat: 57.717,  
> created_at:
> "2008-09-29 23:30:34", updated_at: "2008-09-30 16:46:02">
>
>>> @city_debug.lng
> => 11.967
>
>>> @city_debug.lng == @ip_range.lng
> => true
>

Short version: using equality with floats isn't a foot idea (not just  
in this case - in general)

Fred
> Something is wrong in my find-condition, but I can't seem to figure  
> out
> what it is... maybe something to with floats in find conditions?
>
> Thanks!
>
> g.
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to