publiclab/spectral-workbench

View on GitHub
app/views/match/_livesearch.html.erb

Summary

Maintainability
Test Coverage
<% if @spectra %>
<h3>Matches Found</h3>
<table class="table">
  <% @spectra.each do |spectrum| %>
    <tr id="spectrum_<%= spectrum.id %>">
      <td width="240px;"><a href="<%= spectrum_path(spectrum.id) %>" ><b><%= spectrum.title %></b></a><br /> by <a href="<%= user_path(spectrum.author) %>"><%= spectrum.author %></a> <%= time_ago_in_words(spectrum.created_at) %> ago</td>
    </tr>
  <% end %>
</table>

<% else %>
<h3>Sorry, No matches found!</h3>
<% end %>