From b67144bf911dd6e41775bda99646b3010195c8b3 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 28 Mar 2013 09:11:19 +0100 Subject: split method removed --- app/models/call_forward.rb | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'app/models/call_forward.rb') 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' -- cgit v1.2.3