aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-18 00:26:17 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-18 00:46:01 -0200
commit8470fc9902b97a5341d3afc5cab1a361d21e52de (patch)
treeb271da1f5ff7e0feb15e465906a86b7643bc4092 /actionpack/lib/action_view/helpers
parentb64b7d09c0331e04304c4b6c49f5c314f414475f (diff)
downloadrails-8470fc9902b97a5341d3afc5cab1a361d21e52de.tar.gz
rails-8470fc9902b97a5341d3afc5cab1a361d21e52de.tar.bz2
rails-8470fc9902b97a5341d3afc5cab1a361d21e52de.zip
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.
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/record_tag_helper.rb4
1 files changed, 2 insertions, 2 deletions
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