I’m trying to build a html table in Ruby On Rails with the help of the content_tag method.
Example:
@template.content_tag(:tr, @template.content_tag(:td, options[:argument0]))
This should render to
<tr><td>content of argument0</td></tr>
What I need is something like
<tr><td>content of argument0</td><td>argument1</td> ... </tr>
Can I build this with the same method? How can I pass two content_tags?
You can use
concat:Or using a loop – as OP suggested in the comments