table link <td>


how can i get an whole <td> cell to be a link.

my actual code is:

<% @alluser.each do |x| %>

<%= link_to "#{}", { :controller => 'pages', :action =>
'berufsschule', :given_user =>} , :class => "btn btn-danger" %>

<% end %>

i want a whole table cell as link.. not only the text


You need to use javascript for that. Try adding the onclick attribute on the td element.

and how would it look like?

i don't know how to use all instance variables (e.g. :given_user) with
the onclick!

Please give an example....