aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-07-19 14:56:09 +0200
committerJosé Valim <jose.valim@gmail.com>2010-07-19 14:56:09 +0200
commit70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d (patch)
tree4f55fa26ce942cfbe337eee9812c2dfccbc67363 /actionpack/lib/action_controller
parentab6ff859067b35bda62e9a92fcd710cf925ba2df (diff)
downloadrails-70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d.tar.gz
rails-70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d.tar.bz2
rails-70f7ba3e3bf10e1a646ef6ace09da7b2918ba75d.zip
There is absolutely no need to use __send__ here.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/polymorphic_routes.rb6
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