Changeset 8822
- Timestamp:
- 02/08/08 22:04:06 (7 months ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_view/partials.rb (modified) (2 diffs)
- trunk/actionpack/test/activerecord/render_partial_with_record_identification_test.rb (modified) (2 diffs)
- trunk/actionpack/test/controller/new_render_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r8819 r8822 1 1 *SVN* 2 3 * Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime] 2 4 3 5 * Added support for naming concrete classes in sweeper declarations [DHH] trunk/actionpack/lib/action_view/partials.rb
r8793 r8822 128 128 path = ActionController::RecordIdentifier.partial_path(partial_path.first) 129 129 collection = partial_path 130 render_partial_collection(path, collection, nil, object_assigns.value)130 render_partial_collection(path, collection, nil, local_assigns) 131 131 else 132 132 "" … … 135 135 render_partial( 136 136 ActionController::RecordIdentifier.partial_path(partial_path), 137 object_assigns, local_assigns)137 partial_path, local_assigns) 138 138 end 139 139 end trunk/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
r8564 r8822 35 35 end 36 36 end 37 RenderPartialWithRecordIdentificationController.view_paths = [ File.dirname(__FILE__) + "/../fixtures/" ] 37 38 38 39 def setup … … 59 60 60 61 def test_rendering_partial_with_belongs_to_association 62 topic = Reply.find(1).topic 61 63 get :render_with_belongs_to_association 62 64 assert_template 'topics/_topic' 65 assert_equal topic.title, @response.body 63 66 end 64 67 trunk/actionpack/test/controller/new_render_test.rb
r8786 r8822 150 150 def partial_collection_with_locals 151 151 render :partial => "customer_greeting", :collection => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" } 152 end 153 154 def partial_collection_shorthand_with_locals 155 render :partial => [ Customer.new("david"), Customer.new("mary") ], :locals => { :greeting => "Bonjour" } 152 156 end 153 157 … … 709 713 end 710 714 715 def test_partial_collection_shorthand_with_locals 716 get :partial_collection_shorthand_with_locals 717 assert_equal "Bonjour: davidBonjour: mary", @response.body 718 end 719 711 720 def test_empty_partial_collection 712 721 get :empty_partial_collection