number_to_percentage method error
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
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'