1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added Inflector.humanize to turn attribute names like employee_salary 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
This commit is contained in:
David Heinemeier Hansson 2005-01-17 19:55:21 +00:00
parent 1b38c5523e
commit 03e44cbcb2

View file

@ -31,6 +31,10 @@ module ActiveSupport #:nodoc:
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)