Fixing wrong variable

This commit is contained in:
Linus Gasser 2025-10-13 08:18:06 +02:00
parent 3816f9fb48
commit d8e68caa12

View file

@ -3,16 +3,16 @@
= f.label :username = f.label :username
%abbr{title: 'This field is required'} * %abbr{title: 'This field is required'} *
= f.text_field :username, required: true, autocomplete: 'off', class: 'form-control', placeholder: 'Username' = f.text_field :username, required: true, autocomplete: 'off', class: 'form-control', placeholder: 'Username'
- if resource.errors[:username].any? - if @user.errors[:username].any?
.text-danger .text-danger
= resource.errors[:username].first = @user.errors[:username].first
.form-group .form-group
= f.label :email = f.label :email
%abbr{title: 'This field is required'} * %abbr{title: 'This field is required'} *
= f.email_field :email, required: true, autocomplete: 'off', class: 'form-control', placeholder: 'Email' = f.email_field :email, required: true, autocomplete: 'off', class: 'form-control', placeholder: 'Email'
- if resource.errors[:email].any? - if @user.errors[:email].any?
.text-danger .text-danger
= resource.errors[:email].first = @user.errors[:email].first
- if local_assigns[:full] - if local_assigns[:full]
.checkbox .checkbox
%label %label
@ -25,15 +25,15 @@
- if !@user.persisted? - if !@user.persisted?
%abbr{title: 'This field is required'} * %abbr{title: 'This field is required'} *
= f.password_field :password, required: !@user.persisted?, class: 'form-control', placeholder: 'Password' = f.password_field :password, required: !@user.persisted?, class: 'form-control', placeholder: 'Password'
- if resource.errors[:password].any? - if @user.errors[:password].any?
.text-danger .text-danger
= resource.errors[:password].first = @user.errors[:password].first
.form-group .form-group
= f.label :password_confirmation, 'Password Confirmation' = f.label :password_confirmation, 'Password Confirmation'
= f.password_field :password_confirmation, required: !@user.persisted?, class: 'form-control', placeholder: 'Password Confirmation' = f.password_field :password_confirmation, required: !@user.persisted?, class: 'form-control', placeholder: 'Password Confirmation'
- if resource.errors[:password_confirmation].any? - if @user.errors[:password_confirmation].any?
.text-danger .text-danger
= resource.errors[:password_confirmation].first = @user.errors[:password_confirmation].first
- if @user.persisted? - if @user.persisted?
%p.text-muted %p.text-muted
Leave blank if you don't want to change your password Leave blank if you don't want to change your password