Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

number_to_percentage method error #940

lighthouse-import opened this Issue May 16, 2011 · 3 comments


None yet
2 participants

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6592
Created by raven - 2011-03-18 06:52:21 UTC

When i invoke


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'

Imported from Lighthouse.
Comment by Josh Kalderimis - 2011-03-18 11:35:34 UTC

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?



Imported from Lighthouse.
Comment by raven - 2011-03-21 01:10:08 UTC

yes , I'm using Rails 3.0.0

is this a fixed bug?

but i've searched tickets list, no results~


Karunakar commented May 21, 2011

Its working fine. This ticket is invalid

@hisas hisas pushed a commit to hisas/rails that referenced this issue May 9, 2017

@jeremy jeremy Merge pull request #940 from darrencauthon/remove_more_monkey_patches
Remove to_lf and to_crlf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment