If @service.amount is equal to $28.95: is outputting $2895.00, not what I wrote above. After searching, I didn't find a solution. @service.amount ...
If @service.amount is equal to $28.95: is outputting $2895.00, not what I wrote above. After searching, I didn't find a solution. @service.amount ...
I am trying to create an html file from ERB, as I want to save a copy of invoice of a very complicated calculation. My ERB template is using many diff ...
I am using Stripe and getting currency that is in pennies. So 12.90 looks like 1290. I want to convert this to U.S. Currency but if I try and use the ...
I have a dynamically generated table that multiplies price * qty. Some of the prices are in partial cents. For example if the price of an item is 0.0 ...
In my Ruby on Rails app, I've got a model called Post which has a column named "Price" in it's database table; this column is decimal type with a prec ...
I am working on reports for a website and I am currently thinking of what would be the best way to handle BigDecimal -0.0's. The database I'm workin ...
I have 2 database columns (using mysql) one a decimal(10,2) the other a string. Migration looks like. In a _form.html.erb partial, I have the foll ...
i'm using rails 3.2 and ruby 1.9.3 i'm using this to display a price: in locale :en, it works but in :es I get: comparison of String with 0 failed ...
I want to be able to support multiple (3 for now) currencies on my website. I am a beginner and have doubts on how to do this . I have searched a bit ...
Is there any way to change the value in the display to the following: $100.25 to 10025 Need this to be in this format to go through a payment gatew ...
How can I use number_to_currency and make it delete the zeros in the decimal part? So if I have a number 30.50, I want to keep the .50, but if I have ...
Hi i am messing around with rails, there is a method built into rails that can convert a decimal number into a currency. I could just change it in the ...
Why does number_to_currency(33.50, :locale => :fr) displaying $33.50? It should display it in different currency based on the locale. I would expec ...
I have a brief question... pretty new to rails, and I was wondering if you could help me with an issue that I'm having in code. I have a set of input ...
I'm trying to use number_to_currency to get two digits after the decimal dot in Rails 3, but I can get only one. My DB field is defined like this: ...