rails/rails — pull request #6315 by amutz (2012-05-15 01:29:26+00:00)
Title: Moving number helper from ActionView to Active Support

Hi,

In an earlier pull request I hoped we could decouple ActiveSupport from ActionView:

https://github.com/rails/rails/pull/5675

It was suggested by @josevalim that instead of that approach, we move the number helpers from ActionView to ActiveSupport. In addition to his suggestion, this approach was a feature request in a separate issue:

https://github.com/rails/rails/issues/3214

In this pull request I've moved the functionality from NumberHelper in ActionView to ActiveSupport and added the methods to Numeric. So instead of including NumberHelper and writing "number_to_human(123)", you could just include ActiveSupport and write "123.to_human". The original NumberHelper methods are all left in place and accept the same options and behave the same (and just pass through to the AS implementation in Numeric).

Other interested parties may include: @carlosantoniodasilva, @fxn, and @yfeldblum.

Let me know if you'd like any changes to this implementation.

Thanks,
Andrew.