title: Rails 3 - How to make entire table row clickable using jQuery
body: <p>I have a private messaging system that displays an "inbox" view of all received messages.  This view is simply generated from multiple table rows created by using a block in the view.</p>
  
  <p>I would like to make each table row "clickable" and also pass a parameter (just as if I was using a standard link_to).  However, as you may know, you cannot make a tr clickable like you can with a div.</p>
  
  <p>Therefore, I believe the solution will require some simple jQuery.  I have found some partial answers to this question, but not a complete one.</p>
  
  <p>I know the code below is NOT correct (the link_to part), but can someone please show me how to hook up a rails link_to link using a jQuery click function?</p>
  
  <p>Thanks!</p>
  
  <pre><code>$('tr').click(function() {
    &lt;%= link_to :controller =&gt; "messages", :action =&gt; "show", :id =&gt; msg.convo_id %&gt;
  });
  </code></pre>