Class: UffizziCore::Api::Cli::V1::SessionCreateForm

Inherits:
Object
  • Object
show all
Includes:
UffizziCore::ApplicationFormWithoutActiveRecord
Defined in:
app/forms/uffizzi_core/api/cli/v1/session_create_form.rb

Instance Method Summary collapse

Methods included from UffizziCore::ApplicationFormWithoutActiveRecord

#persisted?

Instance Method Details

#check_authenticateObject



16
17
18
19
20
# File 'app/forms/uffizzi_core/api/cli/v1/session_create_form.rb', line 16

def check_authenticate
  return unless wrong_email_or_password?

  errors.add(:password, 'Email or password is incorrect.')
end

#userObject



12
13
14
# File 'app/forms/uffizzi_core/api/cli/v1/session_create_form.rb', line 12

def user
  @user ||= UffizziCore::User.active.by_email(email).first
end