Ticket #3861: rjs_action_symbol.patch
| File rjs_action_symbol.patch, 1.5 kB (added by rick@rickbradley.com, 3 years ago) |
|---|
-
actionpack/test/controller/new_render_test.rb
old new 30 30 def render_action_hello_world 31 31 render :action => "hello_world" 32 32 end 33 34 def render_action_hello_world_as_symbol 35 render :action => :hello_world 36 end 33 37 34 38 def render_text_hello_world 35 39 render :text => "hello world" … … 282 286 assert_template "test/hello_world" 283 287 end 284 288 289 def test_do_with_render_action_as_symbol 290 get :render_action_hello_world_as_symbol 291 assert_template "test/hello_world" 292 end 293 285 294 def test_do_with_render_text 286 295 get :render_text_hello_world 287 296 assert_equal "hello world", @response.body -
actionpack/lib/action_controller/base.rb
old new 979 979 980 980 def default_template_name(default_action_name = action_name) 981 981 if default_action_name 982 default_action_name = default_action_name. dup982 default_action_name = default_action_name.to_s.dup 983 983 strip_out_controller!(default_action_name) if template_path_includes_controller?(default_action_name) 984 984 end 985 985 "#{self.class.controller_path}/#{default_action_name}"