diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/pager_group.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/pager_group.rb b/app/models/pager_group.rb index 861377f..21396ef 100644 --- a/app/models/pager_group.rb +++ b/app/models/pager_group.rb @@ -4,5 +4,11 @@ class PagerGroup < ActiveRecord::Base has_many :pager_group_destinations, :dependent => :destroy belongs_to :sip_account - validates_presence_of :sip_account_id + validates_presence_of :sip_account_id + + after_create :call + + def call + self.sip_account.call("f-pager-#{self.id}") + end end |