diff options
author | Peter Kozak <spag@golwen.net> | 2013-06-04 11:10:43 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-06-04 11:10:43 +0200 |
commit | 340cfdbf47096bf1263eee0803938ea6b8d605ab (patch) | |
tree | b0604415ed5751d839fc74b8249e8e902f6e5c36 /app/models/pager_group.rb | |
parent | e4b3cf44d7f5a46cb051221b8b2c547a814943c9 (diff) |
call method added
Diffstat (limited to 'app/models/pager_group.rb')
-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 |