Closed Shekharrajak closed 7 years ago
@athityakumar use this in daru-io.
Few things that can be useful in future (TODO):
df.to_html(options)
: where options
may contains table id, class or other styling to include in table tag. (this can be done using content_tag
)
In each row , first column must have th
tag (first column is always index
. Right now it is in tr
tag. ) Just need to modify the tbody erb file.
It will be better if we use
thead
andtbody
tag in the html table code of the DataFrame and Vector . Also I have definedto_html_thead
andto_html_tbody
method to get the header and body part of the html table. These things will be helpful fordaru-view
table ( generate table using DataTables gem ).See how I am using this PR branch in datatables example to generate table code with pagination, search and other features. . Actually DataTables gem will check the thead and tbody of the table.