Added Inflector.humanize to turn attribute names like employee_salary into...

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
上级 1b38c552
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册