wlowry88/friend-of-the-day

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

Summary

Maintainability
Test Coverage
<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>