diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-04 12:05:30 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-04-04 12:05:30 +0200 |
commit | d1ae9ca0016388a0778ece5f382c99f156bdabcb (patch) | |
tree | 632e46e34a4338a6e3b4f7cb2c29c123f50a4ea9 /app/models | |
parent | 4ebbcf3b5576cc342086e2f54950a119a49f2bf9 (diff) | |
parent | d6a733440eee34dab3daf25089d40aed91018a49 (diff) |
Merge branch 'emberjs' into develop
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/switchboard.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/switchboard.rb b/app/models/switchboard.rb index 53f69a4..cf8c708 100644 --- a/app/models/switchboard.rb +++ b/app/models/switchboard.rb @@ -18,6 +18,12 @@ class Switchboard < ActiveRecord::Base :less_than => 5 } + validates :amount_of_displayed_phone_numbers, + :numericality => { :only_integer => true, + :greater_than_or_equal_to => 0, + :less_than => 20 + } + belongs_to :user, :touch => true has_many :switchboard_entries, :dependent => :destroy has_many :sip_accounts, :through => :switchboard_entries |