From 55b6697493e2fc39f3e2a7b6b3c8bcfb94947daa Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 12 Nov 2007 15:02:12 +0000 Subject: Fixed that has_many :through associations should render as collections too (closes #9051) [mathie/danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8130 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/partials.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index 17556b3141..b0570ef78c 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -119,7 +119,7 @@ module ActionView else render("#{path}/_#{partial_name}", local_assigns) end - when Array, ActiveRecord::Associations::AssociationCollection + when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Associations::HasManyThroughAssociation if partial_path.any? path = ActionController::RecordIdentifier.partial_path(partial_path.first) collection = partial_path -- cgit v1.2.3