wlowry88/friend-of-the-day

View on GitHub
app/views/friends/_close_friends_list.html.erb

Summary

Maintainability
Test Coverage
<h1><%= "People You're Keeping in Touch With:" %></h1>
<% @user.friends.select(:id, :name, :phone_number, :email).where(close_friend: true).each do |friend| %>
<div id="close_friend_<%= friend.id %>", class="close_friend col-md-4">
    <h4><%= friend.name %></h4>
    <!--Form for Adding to Close Friends -->
    <%= form_for friend, remote: true do |f| %>
    <%= f.hidden_field :close_friend, :value=> false %>
    <%= f.submit "Remove from Close Friends",class:"btn btn-primary btn-xs" %>
    <% end %>
</div>
<!--     </div> -->
<% end %>