I represent a variable in rails view.
<%= @data.matrix %>
which prints a multidimensional array in a template as follows:
[[":23", ":12"],[ ":56", ":12"],[":21", ":23"]]
As I can present the above data in a table format, that it will actually look like a matrix on the page view.htmlto better read the rows of values and colum. We also have information about templates @data.rowand @data.col.
This is more of a question HTML, but is there a way to do this using syntax rails view?
source
share