Sha256: 7f313eb016b74998c11373cb8dfcbeeeb6b7f8d54ca7450362404918b7a6809c
Contents?: true
Size: 547 Bytes
Versions: 1
Compression:
Stored size: 547 Bytes
Contents
# frozen_string_literal: true module Auth class SessionForm < ApplicationForm attribute :email, String attribute :password, String attribute :device_uid, String, default: 'browser' validates :email, presence: true, length: { maximum: 130 }, email: true validates :password, presence: true, length: { minimum: 6, maximum: 128 } def submit return false unless valid? api_answer = TranslationCms::Api::Customer.authenticate!(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/session_form.rb |