Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bootstrapping Devise New Session 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">Welcome Back!</h2>
<%= form_for resource, as: resource_name, url: session_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>
<% if devise_mapping.rememberable? -%>
<div class="form-group">
<div class="col-sm-10">
<div class="checkbox">
<label>
<%= f.check_box :remember_me %> Remember me
</label>
</div>
</div>
</div>
<% end -%>
<div class="actions">
<%= f.submit "Log in", class: "btn btn-success btn-lg btn-block" %>
</div>
<% 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.