This project is archived and is in readonly mode.

#1624 ✓invalid
YenTheFirst

number_with_* incorrect behavior

Reported by YenTheFirst | December 23rd, 2008 @ 10:48 PM | in 2.x

using rails "2.0.2" In module ActionView::Helpers::NumberHelper, the number_with_* functions do not behave as expected:

According to the documentation at http://api.rubyonrails.org/class...

they should accept a hash of arguments. For example,

number_with_delimiter(12345678, :seperator => ",")
should produce: 12,345,678

but it does not.

here is a test case (run from the console)

include ActionView::Helpers::NumberHelper => Object number_with_delimiter(123456,:delimiter=>',') => "123delimiter,456"

Comments and changes to this ticket

  • Frederick Cheung

    Frederick Cheung December 23rd, 2008 @ 11:19 PM

    • Tag changed from nuwmel to 2.0, numberhelper, number_with_precision
    • State changed from “new” to “invalid”

    That documentation refers to rails 2.2. In Rails 2.0.2 those methods did not take a hash of options, the usage with instead

    
    number_with_delimiter 123456, delimiter, separator
    

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages