diff options
-rw-r--r-- | app/models/phone.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/phone.rb b/app/models/phone.rb index f78ebe2..1f3c497 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, :allow_nil => true before_save :save_last_ip_address before_save :destroy_phones_sip_accounts_if_phoneable_changed |