class String

def humanize

'author_id'.humanize # => "Author"
'employee_salary'.humanize # => "Employee salary"

Like +titleize+, this is meant for creating pretty output.
Capitalizes the first word, turns underscores into spaces, and strips '_id'.
def humanize
  ActiveSupport::Inflector.humanize(self)
end