diff options
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index d8138be3db..08a2d7643f 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -979,7 +979,7 @@ module ActionController #:nodoc: def default_template_name(default_action_name = action_name) if default_action_name - default_action_name = default_action_name.dup + default_action_name = default_action_name.to_s.dup strip_out_controller!(default_action_name) if template_path_includes_controller?(default_action_name) end "#{self.class.controller_path}/#{default_action_name}" diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index 997a49091d..24a92d6f9e 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -30,6 +30,10 @@ class NewRenderTestController < ActionController::Base def render_action_hello_world render :action => "hello_world" end + + def render_action_hello_world_as_symbol + render :action => :hello_world + end def render_text_hello_world render :text => "hello world" @@ -282,6 +286,11 @@ class NewRenderTest < Test::Unit::TestCase assert_template "test/hello_world" end + def test_do_with_render_action_as_symbol + get :render_action_hello_world_as_symbol + assert_template "test/hello_world" + end + def test_do_with_render_text get :render_text_hello_world assert_equal "hello world", @response.body |