summaryrefslogtreecommitdiff
path: root/app/models/call_forward.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-03-27 10:30:12 +0100
committerPeter Kozak <spag@golwen.net>2013-03-27 10:30:12 +0100
commitd5ac8f72af16fa5487ab1e16bf784e8125a7b450 (patch)
tree66709ba821bdaa6ad4cedac84bd2721450d5aee9 /app/models/call_forward.rb
parentec565b14adfdb21c74e6c3558dc8a56082ec1c7a (diff)
destinationable_type can be a non model string
Diffstat (limited to 'app/models/call_forward.rb')
-rw-r--r--app/models/call_forward.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/call_forward.rb b/app/models/call_forward.rb
index 195ac36..fcac294 100644
--- a/app/models/call_forward.rb
+++ b/app/models/call_forward.rb
@@ -2,7 +2,7 @@ class CallForward < ActiveRecord::Base
attr_accessor :to_voicemail, :hunt_group_id
- attr_accessible :phone_number_id, :call_forward_case_id, :timeout,
+ attr_accessible :call_forward_case_id, :timeout,
:destination, :source, :depth, :active, :to_voicemail,
:hunt_group_id,
:call_forwardable_type, :call_forwardable_id,
@@ -71,7 +71,7 @@ class CallForward < ActiveRecord::Base
else
destinationable_type = " #{self.destinationable_type}"
end
- if self.destinationable
+ if Module.constants.include?(destinationable_type.to_sym) && self.destinationable
destination = "#{self.destinationable}#{destinationable_type}"
else
destination = "#{self.destination}#{destinationable_type}"