ruby on rails - Escape format with number_to_currency -


i have weird situation, i'm using number_to_currency helper actionview::helpers::numberhelper. snippet of code using this:

.price   .value= number_to_currency price, format: "%u<b>%n</b>", precision: 0 

when i'm running project locally, works should be:

$500 (only numbers bold)

but when i'm deploying stage server, gives me:

$<b>500</b>  

i'm not sure kind of problem this, i've tried precompile assets didn't help. tried html_safe no success.

any idea how resolve issue? thanks

try this, may work..

.price .value= number_to_currency 100, format: "%u<b>%n</b>".html_safe, precision: 0


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -