summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/phone.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/phone.rb b/app/models/phone.rb
index f78ebe2..9e5766a 100644
--- a/app/models/phone.rb
+++ b/app/models/phone.rb
@@ -32,6 +32,8 @@ class Phone < ActiveRecord::Base
validates_presence_of :phone_model
validates_presence_of :phoneable
+
+ validates_uniqueness_of :fallback_sip_account_id
before_save :save_last_ip_address
before_save :destroy_phones_sip_accounts_if_phoneable_changed