mardi 3 novembre 2015

How to avoid cents display in money rails gem

i used money_without_cents_and_with_symbol @money_object in my view page using 'money rails gem' to avoid the cents dispalyed after point, and i got the dispaly correct, but when i am calculating the price it adds the cents from backend. how to avoid the cents calculation from backend.

what things i need to configure in money.rb i changed like this in money.rb

config.default_format = { :no_cents_if_whole => false, }

but it calulates the cents from backend

Aucun commentaire:

Enregistrer un commentaire