rails/rails — Issue #4736: content_tag_for HTML class attribute issue
Author: mdi
Created: 2012-01-28 20:22:57+00:00
State: open

Using `content_tag_for` in Rails 3.2.1 with an array produces duplicate classes in HTML output for each consecutive array element if the `class` option is given. Example:

content_tag_for(:li, @cities, class: 'foo') do |city|
#...
end

Produces this output:

If I remove the `class` option, output is the expected result, which is no class duplication.