title: Clickable row in table can be used only once
body: <p>I was looking for a way to make table row clickable.</p>
  
  <p>I found answer <a href="https://stackoverflow.com/questions/9945620/making-a-table-row-into-a-link-in-rails">here</a>, but it has one quite bad bug. It only lets you open link once. Even if you're redirected, and then you press "back" button, you can't click again.</p>
  
  <blockquote>
    <p>I personally would put an <code>onclick</code> event on the <code>tr</code> using jQuery.
    The <code>tr</code> element would look like this:</p>
  
  <pre><code>&lt;tr data-link="&lt;%= edit_scout_path(scout) %&gt;"&gt;
     ...
  &lt;/tr&gt;
  </code></pre>
    
    <p>And then the associated JavaScript (placed in a file such as
    <code>app/assets/javascripts/scouts.js</code>) would be something like this:</p>
  
  <pre><code>$("tr[data-link]").click(function() {
    window.location = this.data("link")
  })
  </code></pre>
    
    <p>This would make all <code>tr</code> elements that have a <code>data-link</code> attribute
    act as if they were URLs in the most unobtrusive way I can think
    possible.</p>
  </blockquote>
  
  <p>Only thing that makes it work again is refreshing site, which is really frustrating.</p>
  
  <p>Do you know how may I fix this issue?</p>