Skip to content

Commit abbeca2

Browse files
committed
fix(platform_invitation): removed invitee_email presence & consolidate invitee_email validations for clarity
1 parent 614813c commit abbeca2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/better_together/platform_invitation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class PlatformInvitation < ApplicationRecord
3232

3333
has_rich_text :greeting, encrypted: true
3434

35-
validates :invitee_email, presence: true, format: { with: URI::MailTo::EMAIL_REGEXP }
36-
validates :invitee_email, uniqueness: { scope: :invitable_id, allow_nil: true, allow_blank: true }
35+
validates :invitee_email, format: { with: URI::MailTo::EMAIL_REGEXP },
36+
uniqueness: { scope: :invitable_id, allow_nil: true, allow_blank: true }
3737
validates :locale, presence: true, inclusion: { in: I18n.available_locales.map(&:to_s) }
3838
validates :status, presence: true, inclusion: { in: STATUS_VALUES.values }
3939
validates :token, uniqueness: true

0 commit comments

Comments
 (0)