Setup Faker and Factorybot
All checks were successful
CI / scan_ruby (push) Successful in 20s
CI / scan_js (push) Successful in 11s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 33s

This commit is contained in:
sto
2025-03-27 09:27:25 +01:00
parent 12f9f33034
commit 7023600cd1
9 changed files with 58 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ class SessionsController < ApplicationController
before_action :skip_authorization
def new
@title = "Login"
end
def create

View File

@@ -1,11 +0,0 @@
<%= tag.div(flash[:alert], style: "color:red") if flash[:alert] %>
<%= tag.div(flash[:notice], style: "color:green") if flash[:notice] %>
<%= form_with url: session_path do |form| %>
<%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address] %><br>
<%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72 %><br>
<%= form.submit "Sign in" %>
<% end %>
<br>
<%= link_to "Forgot password?", new_password_path %>

View File

@@ -0,0 +1,13 @@
= form_with url: session_path do |form|
.row.mb-3
.col
.form-floating
= form.email_field :email_address, autocomplete: "username", required: true, autofocus: true, class: "form-control"
= form.label :email_address, class: "required"
.row.mb-3
.col
.form-floating
= form.password_field :password, autocomplete: "current-password", required: true, autofocus: true, class: "form-control", maxlength: 72
= form.label :password, class: "required"
= form.submit "Sign in"