Table link <td>

Hey,

how can i get an whole

cell to be a link.

my actual code is:

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

<%= link_to “#{x.name}”, { :controller => ‘pages’, :action =>
‘berufsschule’, :given_user => x.name} , :class => “btn btn-danger” %>

<% end %>

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

thanks

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


Oscar Del B.
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

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…