From 8470fc9902b97a5341d3afc5cab1a361d21e52de Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 18 Jan 2012 00:26:17 -0200 Subject: Fix errors when running entire suite due to class name collision The Post class is created everywhere in the test suite, and due to that when applying the Array() logic to refactor content_tag_for, some other change to the Post class was breaking record tag tests. The solution is to rename the class to not collide with others already defined in the test suite. --- actionpack/lib/action_view/helpers/record_tag_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/record_tag_helper.rb b/actionpack/lib/action_view/helpers/record_tag_helper.rb index 4cd5fa2ad1..1a15459406 100644 --- a/actionpack/lib/action_view/helpers/record_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/record_tag_helper.rb @@ -83,8 +83,8 @@ module ActionView def content_tag_for(tag_name, single_or_multiple_records, prefix = nil, options = nil, &block) options, prefix = prefix, nil if prefix.is_a?(Hash) - Array.wrap(single_or_multiple_records).map do |single_record| - content_tag_for_single_record tag_name, single_record, prefix, options, &block + Array(single_or_multiple_records).map do |single_record| + content_tag_for_single_record(tag_name, single_record, prefix, options, &block) end.join("\n").html_safe end -- cgit v1.2.3