diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-28 09:11:19 +0100 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-28 09:11:19 +0100 |
commit | b67144bf911dd6e41775bda99646b3010195c8b3 (patch) | |
tree | 4565b05e5e52571925588a74007e001e5adc9577 /app/models/call_forward.rb | |
parent | 6c8f3e9536da2e8364de6696f8e0bb38032d067c (diff) |
split method removed
Diffstat (limited to 'app/models/call_forward.rb')
-rw-r--r-- | app/models/call_forward.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/app/models/call_forward.rb b/app/models/call_forward.rb index fcac294..de3afc4 100644 --- a/app/models/call_forward.rb +++ b/app/models/call_forward.rb @@ -56,7 +56,6 @@ class CallForward < ActiveRecord::Base end } - before_save :split_and_format_destination_numbers after_save :set_presence after_save :deactivate_concurring_entries, :if => Proc.new { |cf| cf.active == true } before_destroy :deactivate_connected_softkeys @@ -102,19 +101,6 @@ class CallForward < ActiveRecord::Base end private - def split_and_format_destination_numbers - if !self.destination.blank? - destinations = self.destination.gsub(/[^+0-9\,]/,'').gsub(/[\,]+/,',').split(/\,/).delete_if{|x| x.blank?} - self.destination = nil - if destinations.count > 0 - destinations.each do |single_destination| - self.destination = self.destination.to_s + ", #{PhoneNumber.parse_and_format(single_destination)}" - end - end - self.destination = self.destination.to_s.gsub(/[^+0-9\,]/,'').gsub(/[\,]+/,',').split(/\,/).sort.delete_if{|x| x.blank?}.join(', ') - end - end - def set_presence state = 'terminated' |