diff --git a/guides/source/action_view_helpers.md b/guides/source/action_view_helpers.md index 24d85c3ce0..304ca6d02b 100644 --- a/guides/source/action_view_helpers.md +++ b/guides/source/action_view_helpers.md @@ -333,6 +333,15 @@ Formats a number into a currency string (e.g., $13.65). number_to_currency(1234567890.50) # => $1,234,567,890.50 ``` +#### number_to_human + +Pretty prints (formats and approximates) a number so it is more readable by users; useful for numbers that can get very large. + +```ruby +number_to_human(1234) # => 1.23 Thousand +number_to_human(1234567) # => 1.23 Million +``` + #### number_to_human_size Formats the bytes in size into a more understandable representation; useful for reporting file sizes to users.