aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2019-07-31 11:41:49 +0900
committerAkira Matsuda <ronnie@dio.jp>2019-07-31 11:51:19 +0900
commit303f388d93aa02a645a80cecafdde61cb6fee9f2 (patch)
treed8369dc9d0d3af3364638714b8cca3a02db2f181
parent23009e3e334626460a95b58b180f34e30631f517 (diff)
downloadrails-303f388d93aa02a645a80cecafdde61cb6fee9f2.tar.gz
rails-303f388d93aa02a645a80cecafdde61cb6fee9f2.tar.bz2
rails-303f388d93aa02a645a80cecafdde61cb6fee9f2.zip
Reduce String allocation when finding controller class
-rw-r--r--actionpack/lib/action_dispatch/http/request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index c78cf4ee8c..54dbb536c1 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -85,7 +85,7 @@ module ActionDispatch
def controller_class_for(name)
if name
controller_param = name.underscore
- const_name = "#{controller_param.camelize}Controller"
+ const_name = controller_param.camelize << "Controller"
ActiveSupport::Dependencies.constantize(const_name)
else
PASS_NOT_FOUND