7stud2
(7stud --)
1
Hi, here is my ruby script displaying the land area:
<%= property.land_area_sqm -%>
I want to delimiter the number to a format with comma
like 10000000 -->10,000,000
I have tried this but not working:
property.land_area_sqm, :precision => 0, :delimiter => ','
any one can help me make it work please
Thanks!
···
--
Posted via http://www.ruby-forum.com/.
Perhaps this is Rails? It's certainly at least ERb
http://apidock.com/rails/ActionView/Helpers/NumberHelper/number_with_precision
-Rob
···
On 2013-Nov-18, at 20:22 , Yinwen X. <lists@ruby-forum.com> wrote:
Hi, here is my ruby script displaying the land area:
<%= property.land_area_sqm -%>
I want to delimiter the number to a format with comma
like 10000000 -->10,000,000
I have tried this but not working:
property.land_area_sqm, :precision => 0, :delimiter => ','
any one can help me make it work please
Thanks!
7stud2
(7stud --)
3
This post has a pure-ruby solution:
···
--
Posted via http://www.ruby-forum.com/.