diff options
author | Marcel Molina <marcel@vernix.org> | 2005-12-20 05:32:39 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2005-12-20 05:32:39 +0000 |
commit | 233208b8bb638bab3ee7f8f88e227fa7d8ee9c7e (patch) | |
tree | 2d11929130e34a17bc68fba22ccf52b5f55c8b59 /actionpack/lib | |
parent | 3c01e01ded4e8e87d48e844881c88f6e47cebdf0 (diff) | |
download | rails-233208b8bb638bab3ee7f8f88e227fa7d8ee9c7e.tar.gz rails-233208b8bb638bab3ee7f8f88e227fa7d8ee9c7e.tar.bz2 rails-233208b8bb638bab3ee7f8f88e227fa7d8ee9c7e.zip |
Don't try to strip out the controller name if default_action_name is nil
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3321 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index c1adbf3b8a..316490736b 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -937,8 +937,10 @@ module ActionController #:nodoc: end def default_template_name(default_action_name = action_name) - default_action_name = default_action_name.dup - strip_out_controller!(default_action_name) if template_path_includes_controller?(default_action_name) + if default_action_name + default_action_name = default_action_name.dup + strip_out_controller!(default_action_name) if template_path_includes_controller?(default_action_name) + end "#{self.class.controller_path}/#{default_action_name}" end |