Skip to content

Commit

Permalink
Added Inflector.humanize to turn attribute names like employee_salary…
Browse files Browse the repository at this point in the history
… into "Employee salary". Used by automated error reporting in AR.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@450 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Jan 17, 2005
1 parent 1b38c55 commit 03e44cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activesupport/lib/core_ext/string/inflections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def tableize
def classify
Inflector.classify(self)
end

def humanize
Inflector.humanize(self)
end

def foreign_key(separate_class_name_and_id_with_underscore = true)
Inflector.foreign_key(self, separate_class_name_and_id_with_underscore)
Expand Down

0 comments on commit 03e44cb

Please sign in to comment.