<%= simple_form_for(resource,
as: resource_name,
url: registration_path(resource_name),
html: { method: :put, class: 'form-horizontal' }
) do |f| %>
<%= devise_error_messages! %>
<%= f.input :first_name %>
<%= f.input :last_name %>
<%= f.input :email %>
<%= f.input :password, hint: "leave blank if you don't want to change it" %>
<%= f.input :password_confirmation %>
<%= f.input :current_password, hint: 'we need your current password to confirm your changes' %>
<%= f.submit "Update", class: 'btn btn-primary' %>
<%= link_to "Back", :back %>
<% end %>
Danger zone
<%= link_to "Cancel account", registration_path(resource_name),
class: 'btn btn-danger pull-right',
confirm: "All your data will be deleted! Are you sure?",
method: :delete %>
If you cancel your account all your data will be deleted!