<%= form_for(current_user, as: :user, url: registration_path(:user), html: { method: :put }) do |f| %>
  <% if current_user.errors.any? %>
    <div class="card red lighten-3">
      <div class="card-content">
        <div class="card-title">Please fix the following errors:</div>
        <ul class="browser-default">
          <%= devise_error_messages! %>
        </ul>
      </div>
    </div>
  <% end %>

  <div class="row">
    <div id="preferences" class="col s12">
      <%= render partial: 'devise/registrations/panes/more', locals: { f: f } %>
    </div>
  </div>

  <div class="center">
    <div class="actions">
      <%= f.submit "Save changes", class: 'btn blue' %>
      <%= link_to "Cancel", :back, class: 'btn grey' %>
    </div>
  </div>
<% end %>
