Skip to content

Commit

Permalink
Validate uniqueness of the from address.
Browse files Browse the repository at this point in the history
Fixes #2745.
  • Loading branch information
ZeiP committed Feb 22, 2022
1 parent ddcd468 commit aedc9f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/preference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ class Preference < ApplicationRecord
belongs_to :user
belongs_to :sms_context, :class_name => 'Context'

validates_uniqueness_of :sms_email, :case_sensitive => false

def self.themes
{ :black => 'black', :light_blue => 'light_blue' }
end
Expand Down

0 comments on commit aedc9f5

Please sign in to comment.