instance method humanize

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

humanize()

Capitalizes the first word, turns underscores into spaces, and strips ‘_id’. Like titleize, this is meant for creating pretty output.

"employee_salary" # => "Employee salary" 
"author_id"       # => "Author"
Source
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 138
        def humanize
          Inflector.humanize(self)
        end

Defined in activesupport/lib/active_support/core_ext/string/inflections.rb line 138 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::CoreExtensions::String::Inflections

Type at least 2 characters to search.

↑↓ navigate · open · esc close