dhhxu/projectscope

View on GitHub
app/views/pull_requests/index.html.erb

Summary

Maintainability
Test Coverage
<p id="notice"><%= notice %></p>

<h1>Listing Pull Requests</h1>

<table>
  <thead>
    <tr>
      <th>Red</th>
      <th>Yellow</th>
      <th>Green</th>
      <th>Project</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @pull_requests.each do |pull_request| %>
      <tr>
        <td><%= pull_request.red %></td>
        <td><%= pull_request.yellow %></td>
        <td><%= pull_request.green %></td>
        <td><%= pull_request.project_id %></td>
        <td><%= link_to 'Show', pull_request %></td>
        <td><%= link_to 'Edit', edit_pull_request_path(pull_request) %></td>
        <td><%= link_to 'Destroy', pull_request, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Pull request', new_pull_request_path %>