mirror of
https://github.com/Evolix/chexpire.git
synced 2024-06-29 12:32:53 +02:00
43 lines
1.6 KiB
Ruby
43 lines
1.6 KiB
Ruby
# == Schema Information
|
|
#
|
|
# Table name: users
|
|
#
|
|
# id :bigint(8) not null, primary key
|
|
# confirmation_sent_at :datetime
|
|
# confirmation_token :string(255)
|
|
# confirmed_at :datetime
|
|
# current_sign_in_at :datetime
|
|
# current_sign_in_ip :string(255)
|
|
# email :string(255) default(""), not null
|
|
# encrypted_password :string(255) default(""), not null
|
|
# last_sign_in_at :datetime
|
|
# last_sign_in_ip :string(255)
|
|
# notifications_enabled :boolean default(TRUE), not null
|
|
# remember_created_at :datetime
|
|
# reset_password_sent_at :datetime
|
|
# reset_password_token :string(255)
|
|
# sign_in_count :integer default(0), not null
|
|
# tos_accepted :boolean default(FALSE), not null
|
|
# unconfirmed_email :string(255)
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_users_on_confirmation_token (confirmation_token) UNIQUE
|
|
# index_users_on_email (email) UNIQUE
|
|
# index_users_on_reset_password_token (reset_password_token) UNIQUE
|
|
#
|
|
|
|
class User < ApplicationRecord
|
|
# Include default devise modules. Others available are:
|
|
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
|
|
devise :database_authenticatable, :registerable,
|
|
:recoverable, :rememberable, :validatable, :confirmable
|
|
|
|
has_many :checks
|
|
validates :tos_accepted, acceptance: true
|
|
|
|
scope :notifications_disabled, -> { where(notifications_enabled: false) }
|
|
end
|