Class: View::Human

Inherits:
Formatter show all
Defined in:
lib/view/formatters/human.rb

Overview

The number_to_human helper was introduced in Rails 3. It will give results like "10 thousand"

See Also:

Instance Attribute Summary

Attributes inherited from Formatter

#block, #template, #value

Instance Method Summary (collapse)

Methods inherited from Formatter

#all_options, as, #format!, inherited, #options, skip_blank_formatter, #to_s, type

Instance Method Details

- (Object) format



11
12
13
# File 'lib/view/formatters/human.rb', line 11

def format
  template.number_to_human(value, options)
end