app/views/friendships/_form.html.erb
<%= form_for(@friendship) do |f| %>
<% if @friendship.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@friendship.errors.count, "error") %> prohibited this friendship from being saved:</h2>
<ul>
<% @friendship.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user_id %><br>
<%= f.number_field :user_id %>
</div>
<div class="field">
<%= f.label :friend_id %><br>
<%= f.number_field :friend_id %>
</div>
<div class="field">
<%= f.label :approved %><br>
<%= f.check_box :approved %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>