diff options
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 |