new.ecr

Copy & Paste the code block below into: views/session/new.ecr

<h1>Sign In</h1>

<%- if user.errors %>
  <ul class="errors">
  <%- user.errors.each do |error| %>
    <li><%= error.to_s %></li>
  <%- end %>
  </ul>
<%- end %>

<form action="/session" method="post">
  <%= csrf_tag %>
  <div class="form-group">
    <input class="form-control" type="email" name="email" placeholder="Email"/>
  </div>
  <div class="form-group">
    <input class="form-control" type="password" name="password" placeholder="Password"/>
  </div>
  <button class="btn btn-success btn-sm" type="submit">Sign In</button>
</form>
<hr/>
<%= link_to("Don't have an account yet?", "/signup") -%>

Last updated