From ddbc75fa1ac525b8721fc5b2f40f91b9df94ee2f Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 11 Jul 2013 15:37:16 +0200 Subject: parent can be changed --- app/models/call_forward.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'app') diff --git a/app/models/call_forward.rb b/app/models/call_forward.rb index 94762e2..874a0de 100644 --- a/app/models/call_forward.rb +++ b/app/models/call_forward.rb @@ -44,13 +44,6 @@ class CallForward < ActiveRecord::Base validates_presence_of :uuid validates_uniqueness_of :uuid - # Make sure the call forward's parent can't be changed: - before_validation { |cfwd| - if cfwd.id && (cfwd.call_forwardable_id != cfwd.call_forwardable_id_was || cfwd.call_forwardable_type != cfwd.call_forwardable_type_was) - errors.add( :call_forwardable_id, "cannot be changed." ) - end - } - before_validation :resolve_prerouting after_save :set_presence -- cgit v1.2.3