Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

number_with_* incorrect behavior

#1624

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"

Reported by YenTheFirst · December 23rd, 2008 @ 10:48 PM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Frederick Cheung
    Frederick Cheung
    • 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
    

    December 23rd, 2008 @ 11:19 PM