I am encountering an issue with a table that is linked to a customer show page
_table.html.erb
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th width="50"><%= sort_link @q, :id, "ID"%></th>
<th width="50"><%= sort_link @q, :health_status_ok, "Status"%></th>
<th width="50"><%= sort_link @q, :first_name, "First Name"%></th>
<th width="50"><%= sort_link @q, :last_name, "Last Name"%></th>
<th>Tickets Enabled</th>
<th>Notes</th>
<th></th>
</tr>
</thead>
<tbody>
<% @customers.each do |customer| %>
<a href="<%= customer_path(customer) %>">
<tr data-link="<%= customer_path(customer) %>">
<td> <%= customer.id %></td>
<td> <i class="<%= status_code_css(customer.health_status_ok)%>"></i></td>
<td><%= customer.first_name %></td>
<td><%= customer.last_name %></td>
<%= ( render 'customers/auto_ticket_enable', customer: customer ) if AUTHORIZED_USERS.include?(session[:current_user_login])%>
<td><%= customer.notes.nil? ? "" : customer.notes %></td>
<td><%= link_to "View", customer_path(customer), class: 'btn center-block' %></td>
</tr>
</a>
<% end %>
</tbody>
</table>
Upon rendering the page, I noticed that the row is not clickable as intended. The generated source code for one instance appears like this:
...
<tbody>
<a href="/customers/11 ">
<tr data-link="/customers/11">
<td> 11</td>
<td> <i class="fa fa-check-circle fa-2x status-ok"></i></td>
<td>Some</td>
<td>Dude</td>
<td style="color:green"><strong>Enabled</strong></td>
<td>123 Anyplace you want. </td>
<td><a class="btn center-block" href="/customers/11">View</a></td>
</tr>
</a>
...
I am seeking guidance on how to resolve the issue of making the entire row clickable. Can someone please advise me on what I might be missing?