similar to: Decimal comma instead of decimal point (i18n issue)

Displaying 20 results from an estimated 1000 matches similar to: "Decimal comma instead of decimal point (i18n issue)"

2005 Jul 24
1
international version for number_to_currency ?
bryce benton wrote: > number_to_currency(1234567890.506) => $1,234,567,890.51 BTW agile book does mention this .. will this number_to_currency(x) be internationalized ? or i can set it to Indonesian for example (or to any other languages rather than just English) ? -- Salam hangat, <%= Arie %> | http://blog.riyari.com | Y!: riyari3 email: ariekusumaatmaja_at_riyari_dot_com
2006 Aug 18
4
HELP!!!! - number_to_currency in model?
Hi, I''m trying to use number_to_currency in one of my models, but i''m getting the following error: undefined method `number_to_currency'' for #<Product:0x396d680> Obviously, my Product model can''t access number_to_currency -- is there something I need to do to make it available? Thanks so much for your assistance. -- Posted via
2009 Jul 24
7
number_to_currency not working since 2.1.1
Back in 2.1.1 everything was sweet: Loading development environment (Rails 2.3.3) >> include ActionView::Helpers::NumberHelper => Object >> number_to_currency(12.3) >> "$12.30" Then I upgraded to 2.3.2 and: Loading development environment (Rails 2.3.3) >> include ActionView::Helpers::NumberHelper => Object >> number_to_currency(12.3) >> 12.3
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
Hi all, Apologies in advance if I got this one wrong, I''m still just a newbie ;-) Going through the Apple ADC RoR tutorial it suddenly occurred to me that the ''number_to_currency()'' helper method was not DRY streamlined. Scenario:: The "number_to_currency()" methods options hash works great when I need to dynamically display different currencies when I
2006 Feb 28
4
number_to_currency UK pounds
I work in the UK and therefore most of my currency figures will be in UK pounds. I realise that to format a number to a currency format I can use: number_to_currency(amt, :unit => "?") but it would be more convenient to set ? as the default currency symbol. What is the best way to do that? Should I edit line 39 of this file:
2006 Apr 08
2
Cannot use view helpers in RJS helpers
Any ideas why I would get an error in a RJS helper on view helpers such as number_to_currency. Example: # my_template.rjs page.help_me # my_helper for my_controller def help_me number_to_currency(10) end I have also tired page.number_to_currency but that doesn''t work either. Cheers, Nicholas
2009 Sep 24
2
Calling ActionView from uninheriting class
Hi Gurus, I have a class, specified in models cart.rb, which doesn''t inherit from anything--it''s just a container class Cart ... I just discovered I can''t call number_to_currency in that class. Any idea how to "include" it in my code? I tried ActionView.number_to_currency without luck. I could kill a few lines of non-DRY regexp code in cart.rb if I could
2007 Nov 27
3
Disappearing decimals... please help!
Maybe it''s all in my head, but I''m having the strangest little issue ever. My pricetags in my rails app are always whole numbers. Rails seems to completely ignore my decimal input. So as a consequence, 10.41 becomes 10.00, always. Here''s some worthwhile stuff: within my 004_create_products.rb file: :price, :decimal, :percision => 2, :default => 0 And calling
2006 Apr 05
1
number_to_currency inside model
I was wondering if this is possible. I have a model (Item) that contains products. These products have prices that I''d like to format using number_to_currency. Rather than doing this several times inside the view, I thought it might be nice to do it once inside the model. The item table has an field called regular_price which holds a currency amount. I would like to do something
2007 Dec 06
3
number_to_currency
I am using the number to currency function because i live in the uk and the company want me to only show values of the pound of course.I have created all my application using ruby script/generate scaffold_resource.... I have come across with a problem... this code is in my applcation: def number_to_currency(number, options = {}) options = options.stringify_keys precision, unit, separator,
2009 Mar 04
10
total per user
so I am trying to sum month over month the amount that a user has posted. So for example: User 1: Jan $3000 Feb $4000 March $1500, etc. I can get this to work if I sum totals (aggregate of all users) but just not by user. Here is my code in the controller: def index @users = User.find :all, :order => ''name ASC'' @deal_groups = Deal.find(:all).group_by {|t|
2010 Oct 16
3
Doubt with symbols in Rails
I was trying to write a wrapper for number_to_currency to return currency in pounds. I used a helper class to do this. def number_to_pounds(amt) number_to_currency(amt, :unit => "£") end This works fine, but I am trying to understand why I can''t use a symbol to pass the values. I thought symbols were like pointers. (you now know I am a newbie). def
2006 Jan 06
2
How do I reference eagerly loaded Models in the View?
[I hope the repost isnt'' "minded". Following the advice of another thread I''ve changed the subject to a question. If I haven''t included important info, please ask. My database is being unduly killed. Jodi] Cheers on-the-Rails-ers, Before I start, I''ve read the ActiveRecord docs on eager loading, but for the life of me, I can''t seem to get
2008 Feb 05
5
how can my model reference a helper?
I know, I know, they''re not allowed to. But here''s my problem. I''ve got a really simple model with two fields, name and price, which I want to show in a form select drop-down. "collection_select" takes a ''text_method'' parameter, which is the method in the model that gets its value placed in the <option> tag. Because I want to show both
2008 Apr 24
7
Please help. The error occurred while evaluating nil.name
Okay so heres my code which works fine, i''ll explain the problem below. <% for num in 1..-04Gazou6+pmm/bHYDwDEOA@public.gmane.org %> <table class="products" id="table1" cellspacing="2" cellpadding="3" border="3"> <tr> <td> <table width="25%"> <tr> <tr> <td><%=
2009 Sep 15
1
comma as decimal separator in xtable
Hello, How can I make xtable print a comma as decimal separator? Setting the option OutDec isn't enough for xtable: library(xtable) options(OutDec = ",") x <- c(1.1, 1.2, 1.3) y <- c(2.3, 2.2, 2.1) d <- data.frame(x, y) d print(xtable(d)) Thanks! Jakson Aquino
2006 Aug 29
1
float/decimal with dot or comma
Hi, I''m facing a really strange behaviour with rails 1.1.6. A model has a field declared as :float in schema.rb, as numeric in postgres 8.1. On save/update, rails makes the decimal point become a comma on the prod server only, hence making a sql error. This error was not there three weeks ago, i.e. when my prod server was in 1.1.4. Maybe something else changed, I cannot be sure
2001 Nov 22
2
comma as decimal separator in plots
Dear R list-members, Is there any way to display numbers with comma as decimal separator, i.e., "5,4" instead of "5.4", in plots (x and y axis, expressions)? Thanks for any suggestion, Antonio Olinto ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2006 Mar 10
5
PDF::Writer Simpletable Iteration
Hello All: I have been working with <a href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html">Austin Ziegler''s PDF::Writer</a> as a means to produce PDF documents from my Rails app. I am stumped on how to iterate through a collection of items and output them in a table format. The way I have tried it so far only returns the last item in the collection -
2002 Jan 19
2
comma as decimal separator in plots
Hi, Some time ago I asked about how to use comma as decimal separator in plots and Mr. Paul Murrell wrote: ------- You could try something with axis() and chartr(), like ... par(mfrow=c(2,1)) plot(1:10/11, rep(1, 10), main="Standard X-Axis") plot(1:10/11, rep(1, 10), main="Customised X-Axis", axes=F) axis(1, at=pretty(1:10/11),