This project is archived and is in readonly mode.

#6592 new
raven

number_to_percentage method error

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

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'

Comments and changes to this ticket

  • Josh Kalderimis

    Josh Kalderimis March 18th, 2011 @ 11:35 AM

    • 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

  • raven

    raven March 21st, 2011 @ 01:10 AM

    yes , I'm using Rails 3.0.0

    is this a fixed bug?

    but i've searched tickets list, no results~

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>

Pages