I'm using Ransack to add a search function to my rails app and I'm also using Money-rails gem to handle price and currency.
I want to enter a price in Dollars in the Ransack search field and then it converts it to cents in order to find it in the relevant table.
So basically the problem is how to convert the input form Dollars to cents before submitting the search with Ransack.
Search form:
<div class="form-group">
<%= f.label :price_cents_gteq, "Price between" %>
<%= f.text_field :price_cents_gteq %>
<%= f.label :price_cents_lteq, "And" %>
<%= f.text_field :price_cents_lteq %>
</div>
Thanks a lot in advance!