aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/polymorphic_routes.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/polymorphic_routes.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
index 18ea82c478..31dba835ac 100644
--- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
+++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
@@ -155,7 +155,7 @@ module ActionDispatch
if parent.is_a?(Symbol) || parent.is_a?(String)
string << "#{parent}_"
else
- string << ActionController::RecordIdentifier.plural_class_name(parent).singularize
+ string << ActiveModel::Naming.plural(parent).singularize
string << "_"
end
end
@@ -164,10 +164,10 @@ module ActionDispatch
if record.is_a?(Symbol) || record.is_a?(String)
route << "#{record}_"
else
- route << ActionController::RecordIdentifier.plural_class_name(record)
+ route << ActiveModel::Naming.plural(record)
route = route.singularize if inflection == :singular
route << "_"
- route << "index_" if ActionController::RecordIdentifier.uncountable?(record) && inflection == :plural
+ route << "index_" if ActiveModel::Naming.uncountable?(record) && inflection == :plural
end
action_prefix(options) + route + routing_type(options).to_s