diff options
author | knapo <knapo@knapo.net> | 2010-06-22 20:47:31 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-23 01:37:52 +0200 |
commit | 995b1a243cf8450b976eb40613f5cb703a22159a (patch) | |
tree | 2c50fa5961367fcb1de76ebd3aa8cc7f9f712f33 /actionpack/lib/action_controller | |
parent | ed5c096d60efc432d6f731f86a8ea3c2cb9aeb64 (diff) | |
download | rails-995b1a243cf8450b976eb40613f5cb703a22159a.tar.gz rails-995b1a243cf8450b976eb40613f5cb703a22159a.tar.bz2 rails-995b1a243cf8450b976eb40613f5cb703a22159a.zip |
Fix controller_name for non default controller paths [#4901 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 159d1f0748..2281c500c5 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -61,7 +61,7 @@ module ActionController # ==== Returns # String def self.controller_name - @controller_name ||= controller_path.split("/").last + @controller_name ||= self.name.demodulize.sub(/Controller$/, '').underscore end # Delegates to the class' #controller_name |