SessionController: new User in view

This commit is contained in:
simon lehericey 2019-08-16 16:22:19 +02:00
parent 416a07d2dd
commit 9c715b2969
2 changed files with 2 additions and 3 deletions

View file

@ -9,7 +9,6 @@ class Users::SessionsController < Devise::SessionsController
# GET /resource/sign_in # GET /resource/sign_in
def new def new
@user = User.new
end end
# POST /resource/sign_in # POST /resource/sign_in

View file

@ -8,14 +8,14 @@
%hr %hr
= form_for @user, url: user_session_path, html: { class: "form" } do |f| = form_for User.new, url: user_session_path, html: { class: "form" } do |f|
%h1 Connectez-vous %h1 Connectez-vous
= f.label :email, "Email" = f.label :email, "Email"
= f.text_field :email, autofocus: true = f.text_field :email, autofocus: true
= f.label :password, "Mot de passe" = f.label :password, "Mot de passe"
= f.password_field :password, value: @user.password, placeholder: "8 caractères minimum" = f.password_field :password, placeholder: "8 caractères minimum"
.auth-options .auth-options
%div %div