Skip to content

Instantly share code, notes, and snippets.

@israelb
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save israelb/05d99bea7737d86b9844 to your computer and use it in GitHub Desktop.

Select an option

Save israelb/05d99bea7737d86b9844 to your computer and use it in GitHub Desktop.
editar cuenta
<div class="authform">
<h3>Editar cuenta</h3>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :role => 'form'}) do |f| %>
<%= devise_error_messages! %>
<div class="form-group">
<%= f.label :firstname %>
<%= f.text_field :firstname, :autofocus => true, class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, class: 'form-control' %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>
</div>
<fieldset>
<p>Deja estos campos en blanco si no quieres cambiar tu password.</p>
<div class="form-group">
<%= f.label "Contraseña" %>
<%= f.password_field :password, :autocomplete => 'off', class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label "Confirmar contraseña" %>
<%= f.password_field :password_confirmation, class: 'form-control' %>
</div>
</fieldset>
<fieldset>
<p>Debes de teclear tu contraseña actual para hacer los cambios.</p>
<div class="form-group">
<%= f.label "Constraseña actual" %>
<%= f.password_field :current_password, class: 'form-control' %>
</div>
</fieldset>
<%= f.submit 'Actualizar', :class => 'button right' %>
<% end %>
</div>
devise_for :users, controllers:{
registrations: 'users/registrations'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment