Skip to content

Commit

Permalink
Revert "Merge pull request #22780 from pauloancheta/master"
Browse files Browse the repository at this point in the history
This reverts commit 7aa047b, reversing
changes made to c9b36dd.

This is a right example for singular names.
  • Loading branch information
kamipo committed Feb 13, 2020
1 parent a974898 commit 76ae3db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/inflector/methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def tableize(class_name)
#
# Singular names are not handled correctly:
#
# classify('calculus') # => "Calculus"
# classify('calculus') # => "Calculu"
def classify(table_name)
# strip out any leading schema name
camelize(singularize(table_name.to_s.sub(/.*\./, "")))
Expand Down
3 changes: 2 additions & 1 deletion activesupport/test/inflector_test_cases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ module InflectorTestCases

ClassNameToTableName = {
"PrimarySpokesman" => "primary_spokesmen",
"NodeChild" => "node_children"
"NodeChild" => "node_children",
"Calculu" => "calculus" # Singular names are not handled correctly
}

StringToParameterized = {
Expand Down

0 comments on commit 76ae3db

Please sign in to comment.