Now that content_tag works outside of Erb again (circa changeset #6652), it would be nice if it handled blocks a little differently. Example:
content_tag :table do
content_tag :tr do
content_tag :td, 'data 1'
content_tag :td, 'data 2'
end
end
Doesn't work because only the last td is returned. You'll get
<table>
<tr>
<td>data 2</td>
</tr>
</table>
Instead of
<table>
<tr>
<td>data 1</td>
<td>data 2</td>
</tr>
</table>
I think if content_tag functioned like this, it would would clean up helpers a lot. I've tried to create a patch, but I can't figure it out. Please let me know if this isn't possible / there's a better solution.