Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrapping Devise New Registration View on Rails 4.2.0 with Bootstrap 3
<div class="container">
<div class="row">
<div class="col-sm-4 col-sm-offset-4">
<div class="light-well">
<h2 class="page-header text-center">Sign Up</h2>
<%= form_for resource, as: resource_name, url: registration_path(resource_name),
html: { class: "form-horizontal center"} do |f| %>
<div class="form-group">
<%= f.email_field :email, autofocus: true, placeholder: "Email Address", class: "form-control" %>
</div>
<div class="form-group">
<%= f.password_field :password, autocomplete: "off", placeholder: "Password", class: "form-control" %>
</div>
<div class="form-group">
<%= f.password_field :password_confirmation, autocomplete: "off", placeholder: "Confirm Password", class: "form-control" %>
<% if @validatable %>
<p class="help-block"><%= @minimum_password_length %> characters minimum</p>
<% end %>
</div>
<div class="actions">
<%= f.submit "Sign up", class: "btn btn-success btn-lg btn-block" %>
</div>
<%= devise_error_messages! %>
<% end %>
</div>
<br>
<br>
<%= render "devise/shared/links" %>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.