2018-03-06 13:44:29 +01:00
|
|
|
class Invite < ApplicationRecord
|
2016-02-08 18:16:18 +01:00
|
|
|
belongs_to :dossier
|
|
|
|
belongs_to :user
|
|
|
|
|
2018-03-06 13:44:29 +01:00
|
|
|
validates :email, presence: true
|
|
|
|
validates :email, uniqueness: { scope: :dossier_id }
|
2016-02-08 18:16:18 +01:00
|
|
|
|
|
|
|
validates :email, email_format: true
|
|
|
|
end
|