From c848c4c6217d825514fe96b37c17ac446a9cd779 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Fri, 8 Feb 2008 22:04:06 +0000 Subject: Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/new_render_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index d3f5ccf4aa..4d62647e8b 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -151,6 +151,10 @@ class NewRenderTestController < ActionController::Base render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" } end + def partial_collection_shorthand_with_locals + render :partial => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" } + end + def empty_partial_collection render :partial => "customer", :collection => [] end @@ -708,6 +712,11 @@ EOS assert_equal "Bonjour: davidBonjour: mary", @response.body end + def test_partial_collection_shorthand_with_locals + get :partial_collection_shorthand_with_locals + assert_equal "Bonjour: davidBonjour: mary", @response.body + end + def test_empty_partial_collection get :empty_partial_collection assert_equal " ", @response.body -- cgit v1.2.3