Edit <%= resource_name.to_s.humanize %>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> <%= devise_error_messages! %> <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
<% end %> <%= form_password_field f, :password %> <%= form_password_field f, :password_confirmation %> <%= form_password_field f, :current_password %> <%= f.label :avatar %> <%= f.file_field :avatar %> <%= f.submit "Update", class: 'btn btn-primary' %> <% end %> <% if current_user.dagschotel.present? %>

Current Dagschotel:

<%= image_tag current_user.dagschotel.avatar %>
<% end %>

Choose new Dagschotel:

<% Product.all.each do |p| %> <%= link_to image_tag(p.avatar), user_dagschotel_path(current_user, p) %> <% end %>