Sha256: ceb9fefd5b79957cbcf318a4c88a54dadd8e9c39fe371c096b0be9cba978da68

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

module Auth
  class PasswordNewForm < ApplicationForm
    attribute :email, String
    attribute :device_uid, String, default: 'browser'

    validates :email, presence: true, length: { maximum: 130 }, email: true

    def submit
      return false unless valid?

      api_answer = TranslationCms::Api::Customer.send_reset_password_instructions(attributes)
      merge_responce! api_answer
      errors.empty?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/forms/auth/password_new_form.rb