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_to_percentage method error

#6592

When i invoke

number_to_percentage(100)

it got a error.

this method in api is

number_to_percentage(number, options = {})

Point is if add :precision parameter to it, like

number_to_percentage(100, :precision => 2)

it works.

here is the trace information

activesupport (3.0.0) lib/active_support/whiny_nil.rb:48:in `method_missing'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rational.rb:526:in `**'
actionpack (3.0.0) lib/action_view/helpers/number_helper.rb:269:in `number_with_precision'
actionpack (3.0.0) lib/action_view/helpers/number_helper.rb:163:in `number_to_percentage'

Reported by raven · March 18th, 2011 @ 06:52 AM

State: new
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Josh Kalderimis
    Josh Kalderimis
    • Importance changed from to Low

    Hi Raven,

    I have tried reproducing this bug but everything seems to work fine, can you please provide further information on how to reproduce this issue.

    Are you using Rails 3.0.0?

    Can you confirm if this bug exists against 3.0.6?

    Thanks

    Josh

    March 18th, 2011 @ 11:35 AM

  2. raven
    raven

    yes , I'm using Rails 3.0.0

    is this a fixed bug?

    but i've searched tickets list, no results~

    March 21st, 2011 @ 01:10 AM