I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at weston@westonganger.com. Thanks in advance for any leads!

How To Add Comma's To Numbers In Ruby

Posted by Weston Ganger

If you have some large numbers, displaying them without commas can be hard to read.

Here a simple method in Rails through ActiveSupport


# in controller or view
number_with_delimiter(123456789)
# => 123,456,789

#in console
helper.number_with_delimiter(123456789)


Related External Links:

Article Topic:Software Development - Rails

Date:February 05, 2016

Recommended Posts