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:
parent
1b38c5523e
commit
03e44cbcb2
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue