0

Any handy method to have for instance the number 1000000 become 1.000.000 and 10000 become 10.000 etc? I'm dealing with integers so comma's are not a necessity to include (but would be handy though, like 10.000,53).

Thanks in advance

Flame
  • 6,663
  • 3
  • 33
  • 53

1 Answers1

4

Check out the number_with_delimiter helper.

This is assuming that you're using Ruby on Rails, not just Ruby. number_with_delimiter is a Rails helper method that isn't available in Ruby, unless you coded it yourself.

Zajn
  • 4,078
  • 24
  • 39