Permalink
Find file
735df12 Feb 17, 2014
@harlow @edwardloveall
27 lines (24 sloc) 681 Bytes
<%= form_for(@friend, multipart: true) do |f| %>
<% if @friend.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@friend.errors.count, "error") %> prohibited this friend from being saved:</h2>
<ul>
<% @friend.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :name %>
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :avatar %>
<%= f.file_field :avatar %>
</div>
<div class="actions">
<%= f.submit 'Make a friend' %>
<%= link_to 'Nevermind', friends_path, class: 'button' %>
</div>
<% end %>