Newbie: Radiobutton onclick



I would like to make a simple html which displays the contents of a
table from a database. So I put radiobuttons near the titles of the
columns to note and do a sorting by that column. But I don’t know how
to implement that the clicking on one of the radiobuttons make the
sorting. The problem is the view part. How to give a radiobutton to
make some action on a click by the helper?

The code is:

<% for col in Product.content_columns %> <% end%> <% for prod in @product %> <% for col in Product.content_columns %> <% end %> <% end %>
<%= radio_button :index, 'head', %><%= %>
<%= prod.send( unless (prod.send( == "") %> <%= " " if (prod.send( == "") %>