Reputation: 15136
I'm trying to print out an HTML table in Ruby on Rails
<h1>Welcome</h1>
<p>
<%= sprintf print_series(@myTable) %>
</p>
*The Helper:
module WelcomeHelper
def print_series(graph)
res = '<table border="2">'
graph.each {
|point|
res = res + new_row(new_cell(point["date"]) + new_cell(point["value"]))
}
res << '</table>'
return res.html_safe
end
end
Nothing seems to work, I keep getting the HTML tags escaped, such that I can "see" the HTML on my browser, instead of seeing a table. What am I doing wrong?
Upvotes: 0
Views: 1758