aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xactionpack/lib/action_controller/base.rb2
-rw-r--r--actionpack/test/controller/render_test.rb11
2 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 08a2d7643f..4551dd9f74 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -664,7 +664,7 @@ module ActionController #:nodoc:
end
def render_action(action_name, status = nil, with_layout = true)
- template = default_template_name(action_name)
+ template = default_template_name(action_name.to_s)
if with_layout && !template_exempt_from_layout?(template)
render_with_layout(template, status)
else
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index fe59035cf4..99e73abd3e 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -30,7 +30,11 @@ class TestController < ActionController::Base
def render_action_hello_world
render_action "hello_world"
end
-
+
+ def render_action_hello_world_with_symbol
+ render_action :hello_world
+ end
+
def render_text_hello_world
render_text "hello world"
end
@@ -137,6 +141,11 @@ class RenderTest < Test::Unit::TestCase
assert_equal "test/hello_world", process_request.template.first_render
end
+ def test_do_with_render_action_with_symbol
+ @request.action = "render_action_hello_world_with_symbol"
+ assert_equal "test/hello_world", process_request.template.first_render
+ end
+
def test_do_with_render_text
@request.action = "render_text_hello_world"
assert_equal "hello world", process_request.body