generated from espoo-dev/rails_boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuser.rb
More file actions
20 lines (16 loc) · 687 Bytes
/
user.rb
File metadata and controls
20 lines (16 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true
class User < ApplicationRecord
acts_as_paranoid
# Include default devise modules. Others available are:
# :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable, :api,
:omniauthable, :confirmable, :lockable,
omniauth_providers: %i[github strava]
has_many :event_procedures, dependent: :destroy
has_many :medical_shifts, dependent: :destroy
has_many :patients, dependent: :destroy
has_many :procedures, dependent: :destroy
has_many :health_insurances, dependent: :destroy
validates :email, uniqueness: { case_sensitive: false }
end