summaryrefslogtreecommitdiff
path: root/app/models/switchboard.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-03 22:08:19 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-03 22:09:33 +0200
commitcea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (patch)
treee216a9634c31047e8908a882aed9ff2545ed99e6 /app/models/switchboard.rb
parent64653a9149eca977c16233abb0a472730b94a464 (diff)
Massive changes to the switchboard.
Diffstat (limited to 'app/models/switchboard.rb')
-rw-r--r--app/models/switchboard.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/switchboard.rb b/app/models/switchboard.rb
index 360de70..53f69a4 100644
--- a/app/models/switchboard.rb
+++ b/app/models/switchboard.rb
@@ -8,7 +8,7 @@ class Switchboard < ActiveRecord::Base
validates :reload_interval,
:numericality => { :only_integer => true,
- :greater_than => 250,
+ :greater_than => 249,
:allow_nil => true
}
@@ -21,6 +21,7 @@ class Switchboard < ActiveRecord::Base
belongs_to :user, :touch => true
has_many :switchboard_entries, :dependent => :destroy
has_many :sip_accounts, :through => :switchboard_entries
+ has_many :phone_numbers, :through => :sip_accounts
before_validation :convert_0_to_nil