app/views/profiles/edit.html.erb
<div id='new_item'>
<div id='new_item_container'>
<h3>Editing profile</h3>
<%= form_for @user, url: profile_path, method: :put, html: { multipart: true } do |f| %>
<% if @user.errors.any? %>
<div id='error_explanation'>
<h2><%= pluralize(@user.errors.count, 'error') %> prohibited this event from being saved:</h2>
<ul>
<% @user.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class='field'>
<%= f.label :name %> <small class='vermelho'>*</small><br />
<%= f.text_field :name %>
</div>
<div class='field'>
<% if @user.invalid_email_and_unconfirmed? %>
<%= f.label :unconfirmed_email %> <small class='vermelho'>*</small><br />
<%= f.text_field :unconfirmed_email %>
<p class="special-warning"><%= t('profile.unconfirmed_email') %> <%= link_to t('profile.resend_confirmation_email'), resend_confirmation_email_profile_path %></p>
<% else %>
<%= f.label :email %> <small class='vermelho'>*</small><br />
<%= f.text_field :email %>
<% end %>
</div>
<div class='field'>
<%= user_picture @user %><br />
<%= f.label :photo, 'Picture' %><br />
<%= f.file_field :photo %>
<%= f.hidden_field :photo_cache %>
</div>
<div class='actions'>
<%= image_submit_tag 'save.png' %>
</div>
<% end %>
</div>
</div>