Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes a regression introduced by 532cd4, and a bogus test in AP the r…

…egression uncovered
  • Loading branch information...
commit fd5d9b366c7ad192bbcf5b3c0a774ff684cb9d78 1 parent d94e427
@fxn fxn authored
View
12 actionpack/test/dispatch/routing_test.rb
@@ -2153,25 +2153,25 @@ def test_resources_are_not_pluralized
def test_singleton_resources_are_not_singularized
with_test_routes do
get '/medical/taxis/new'
- assert_equal 'medical/taxes#new', @response.body
+ assert_equal 'medical/taxis#new', @response.body
assert_equal '/medical/taxis/new', new_medical_taxis_path
post '/medical/taxis'
- assert_equal 'medical/taxes#create', @response.body
+ assert_equal 'medical/taxis#create', @response.body
get '/medical/taxis'
- assert_equal 'medical/taxes#show', @response.body
+ assert_equal 'medical/taxis#show', @response.body
assert_equal '/medical/taxis', medical_taxis_path
get '/medical/taxis/edit'
- assert_equal 'medical/taxes#edit', @response.body
+ assert_equal 'medical/taxis#edit', @response.body
assert_equal '/medical/taxis/edit', edit_medical_taxis_path
put '/medical/taxis'
- assert_equal 'medical/taxes#update', @response.body
+ assert_equal 'medical/taxis#update', @response.body
delete '/medical/taxis'
- assert_equal 'medical/taxes#destroy', @response.body
+ assert_equal 'medical/taxis#destroy', @response.body
end
end
View
5 activesupport/lib/active_support/inflections.rb
@@ -2,7 +2,7 @@ module ActiveSupport
Inflector.inflections do |inflect|
inflect.plural(/$/, 's')
inflect.plural(/s$/i, 's')
- inflect.plural(/(ax|test)is$/i, '\1es')
+ inflect.plural(/^(ax|test)is$/i, '\1es')
inflect.plural(/(octop|vir)us$/i, '\1i')
inflect.plural(/(octop|vir)i$/i, '\1i')
inflect.plural(/(alias|status)$/i, '\1es')
@@ -40,7 +40,8 @@ module ActiveSupport
inflect.singular(/(bus)(es)?$/i, '\1')
inflect.singular(/(o)es$/i, '\1')
inflect.singular(/(shoe)s$/i, '\1')
- inflect.singular(/(cris|ax|test)(is|es)$/i, '\1is')
+ inflect.singular(/(cris|test)(is|es)$/i, '\1is')
+ inflect.singular(/^(a)x[ie]s$/i, '\1xis')
inflect.singular(/(octop|vir)(us|i)$/i, '\1us')
inflect.singular(/(alias|status)(es)?$/i, '\1')
inflect.singular(/^(ox)en/i, '\1')
View
1  activesupport/test/inflector_test_cases.rb
@@ -93,6 +93,7 @@ module InflectorTestCases
"matrix_fu" => "matrix_fus",
"axis" => "axes",
+ "taxi" => "taxis", # prevents regression
"testis" => "testes",
"crisis" => "crises",
Please sign in to comment.
Something went wrong with that request. Please try again.