Sha256: c3fad4fe56803e90d73638b57c0a93f3bdef70e90c474619361ac238858afe91
Contents?: true
Size: 343 Bytes
Versions: 4
Compression:
Stored size: 343 Bytes
Contents
class <%= class_name %> < ApplicationRecord has_secure_password :password has_secure_token :session_token validates :email, presence: true, uniqueness: true validates :email, format: { with: /\A[^@\s]+@[^@\s]+\z/ } validates :password, length: 8..70, allow_blank: true before_validation { self.email = email.downcase.strip } end
Version data entries
4 entries across 4 versions & 1 rubygems