From e3c02d8c66ae3df7a58ba7d76dfc464f26dcff67 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 9 Sep 2005 07:27:44 +0000 Subject: Fixed that render :partial would fail when :object was a Hash (due to backwards compatibility issues) #2148 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/new_render_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/controller/new_render_test.rb') diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index 7c829e68de..a1af0a0091 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -101,6 +101,10 @@ class NewRenderTestController < ActionController::Base def empty_partial_collection render :partial => "customer", :collection => [] end + + def partial_with_hash_object + render :partial => "hash_object", :object => {:first_name => "Sam"} + end def hello_in_a_string @customers = [ Customer.new("david"), Customer.new("mary") ] @@ -371,6 +375,11 @@ class NewRenderTest < Test::Unit::TestCase assert_equal " ", @response.body end + def test_partial_with_hash_object + get :partial_with_hash_object + assert_equal "Sam", @response.body + end + def test_render_text_with_assigns get :render_text_with_assigns assert_equal "world", assigns["hello"] -- cgit v1.2.3