ernie/meta_search — Issue #73: Problem searching with float types
Author: lpavone
Created: 2011-11-11 12:10:22+00:00
State: open

Hi, I'm having an issue when I try search over float types.
For example, I have this field:
<%= text_field_tag :price_equals %>

And when I try search with "4.5" I can see in the console that the SQL is traduced as:

SELECT `products`.* FROM `products` WHERE `products`.`price` = 4

I don't know why convert 4.5 to 4.
I tried adding a new where like this:

MetaSearch::Where.add :equals4numbers,
:predicate => :eq,
:types => NUMBERS

but the problem persist.
Any ideas?

Thanks in advance! (and sorry for my english)