Hi!
I'm writing helper to render html table header
def display_standard_table(columns)
content_tag :table do
content_tag :thead do
content_tag :tr do
concat columns.collect { |column| content_tag(:th, 'Header'.html_safe) }
end
end
end
end
The html output is escaped:
<table><thead><tr><th>Header</th><th>Header</th></tr></thead></table>
How do I make it unescaped?
[SOLUTION]
def display_standard_table(columns, objects = [])
content_tag :table do
content_tag :thead do
content_tag :tr do
columns.collect { |column| content_tag(:th, column[:display_name]) }.join()
end
end
end
end