Sha256: f79c8358e4112282a8e5e69f50ad4d2b3851d6b429a1fedd2dde51b95fdcffcd
Contents?: true
Size: 523 Bytes
Versions: 3
Compression:
Stored size: 523 Bytes
Contents
class User < ApplicationRecord authenticates_with_sorcery! validates :password, length: { minimum: 3 }, if: -> { new_record? || changes[:crypted_password] } validates :password, confirmation: true, if: -> { new_record? || changes[:crypted_password] } validates :password_confirmation, presence: true, if: -> { new_record? || changes[:crypted_password] } before_update :setup_activation, if: -> { email_changed? } after_update :send_activation_needed_email!, if: -> { previous_changes["email"].present? } end
Version data entries
3 entries across 3 versions & 1 rubygems