<li class="request" data-id="<%= request.id %>">

  <p class="content">
    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>
  </p>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <% if request.requester == current_user || request.responder == current_user %>
      <%= link_to "Initiate Chat", request_messages_path(request) %>
    <% else %>
      <p>Someone is already being a neighbor to <%= request.requester.first_name%>. Thanks for checking!  <%= button_to 'Return to Home', root_path %>
    <% end %>
  <% end %>
</li>

<li class="request" data-id="<%= request.id %>">

  <p class="content">
    <%= request.requester.first_name %> said: <%= request.content %>
    At <%= request.created_at %>
  </p>

  <% if request.requester == current_user %>
    <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
  <% elsif request.responder == nil %>
    <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
  <% else %>
    <%= link_to "Initiate Chat", request_messages_path(request) %>
  <% end %>
</li>

Refactor layout in the request partial, using the assumption that 1) the request is active and 2) if the request has two parties, only those belong to that party can see the request.
Refactor layout in the request partial, using the assumption that 1) the
request is active and 2) if the request has two parties, only those
belong to that party can see the request.
