Displaying 1 result from an estimated 1 matches for "number_helper_overrides".
2011 Oct 26
3
Overriding number_to_human (Rails 3.0.5)
...n error when passed any number bigger than 0 and
less than 1.
eg number_to_human(0.2) gives "nil can''t be coerced into fixnum"
So, I found this patch:
https://github.com/rails/rails/commit/7c8a5f5759a0c63945d133280fb78deaa86b65b9
Now to apply it, I had to create a file: lib/number_helper_overrides and
put the override code in there:
module ActionView
module Helpers
module NumberHelper
def number_to_human(number, options = {})
#the code in here bla bla
end
end
end
end
then in environment.rb I put:
require "number_helper_overrides"
Is this the pr...