From 6807b080996ee4bd6b80abb4f5e9964632c421c8 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 21 Jul 2010 10:37:09 +0200 Subject: Moved a few methods from RecordIdentifier to ActiveModel::Naming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing') 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 -- cgit v1.2.3