diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-19 14:56:09 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-19 14:56:09 +0200 |
commit | 70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d (patch) | |
tree | 4f55fa26ce942cfbe337eee9812c2dfccbc67363 /actionpack | |
parent | ab6ff859067b35bda62e9a92fcd710cf925ba2df (diff) | |
download | rails-70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d.tar.gz rails-70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d.tar.bz2 rails-70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d.zip |
There is absolutely no need to use __send__ here.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/polymorphic_routes.rb | 6 |
1 files 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 @@ module ActionController 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 @@ module ActionController 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 @@ module ActionController 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 |