I have the following haml code:
- @theLinks.each_index do |x|
%br
%form{:action=>'/Download', :method=>"post",:enctype=>"multipart/form-data"}
%input{:type=>"submit", :name=>"#{@theLinks[x].url}", :value=>"Name: #{@theLinks[x].Name} Study Time: #{@theLinks[x].studyTime} Comments: #{@theLinks[x].comments}"}
Basically, for each person, list the time they participated in a study and the comments on the study. Right now, this renders as a set of buttons. I'd like to render it as a table, with each row clickable in the same way (ie, using the 'post' method, so that only the haml file has to be edited without touching the rest of the files).
Ideally, I'd also like to be able to sort the table by name, time, or comments, but that might be getting ahead of myself.
So how can I change this list of buttons into a table with clickable rows?