add user document model

This commit is contained in:
João Geonizeli
2021-08-04 21:53:58 -03:00
parent 95079e2ae7
commit 30b290514f
11 changed files with 158 additions and 3 deletions

View File

@@ -16,6 +16,8 @@
# index_users_on_email (email) UNIQUE
#
class User < ApplicationRecord
has_many :documents, class_name: "UserDocument", dependent: :destroy
validates :first_name, :last_name, :email, presence: true
def full_name