From 70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 19 Jul 2010 14:56:09 +0200 Subject: [PATCH] There is absolutely no need to use __send__ here. --- actionpack/lib/action_controller/polymorphic_routes.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_controller/polymorphic_routes.rb b/actionpack/lib/action_controller/polymorphic_routes.rb index bee50a7a3b..b4837c610a 100644 --- a/actionpack/lib/action_controller/polymorphic_routes.rb +++ b/actionpack/lib/action_controller/polymorphic_routes.rb @@ -110,7 +110,7 @@ def polymorphic_url(record_or_hash_or_array, options = {}) args.last.kind_of?(Hash) ? args.last.merge!(url_options) : args << url_options end - __send__(named_route, *args) + send(named_route, *args) end # Returns the path component of a URL for the given record. It uses @@ -154,7 +154,7 @@ def build_named_route_call(records, inflection, options = {}) if parent.is_a?(Symbol) || parent.is_a?(String) string << "#{parent}_" else - string << RecordIdentifier.__send__("plural_class_name", parent).singularize + string << RecordIdentifier.plural_class_name(parent).singularize string << "_" end end @@ -163,7 +163,7 @@ def build_named_route_call(records, inflection, options = {}) if record.is_a?(Symbol) || record.is_a?(String) route << "#{record}_" else - route << RecordIdentifier.__send__("plural_class_name", record) + route << RecordIdentifier.plural_class_name(record) route = route.singularize if inflection == :singular route << "_" route << "index_" if RecordIdentifier.uncountable?(record) && inflection == :plural -- GitLab