summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-07-08 13:24:52 +0200
committerPeter Kozak <spag@golwen.net>2013-07-08 13:24:52 +0200
commit961453a7a7d4926e837e9f9225074e3d0817f665 (patch)
tree7e32a2244bc7367b6a4e4b2b5f175b36a5b7e78c /app/models
parentf2b72ef12ed2bfb2d942fd6654d8816f863b0970 (diff)
destinationable_type can be nil
Diffstat (limited to 'app/models')
-rw-r--r--app/models/call_forward.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/call_forward.rb b/app/models/call_forward.rb
index 159eb84..0df2a35 100644
--- a/app/models/call_forward.rb
+++ b/app/models/call_forward.rb
@@ -90,25 +90,25 @@ class CallForward < ActiveRecord::Base
end
def destination_phone_number
- if self.destinationable_type.downcase == 'phonenumber'
+ if self.destinationable_type.to_s.downcase == 'phonenumber'
return self.destination
end
end
def destination_phone_number=(destination_number)
- if self.destinationable_type.downcase == 'phonenumber'
+ if self.destinationable_type.to_s.downcase == 'phonenumber'
self.destination = destination_number
end
end
def destination_greeting
- if self.destinationable_type.downcase == 'voicemailaccount'
+ if self.destinationable_type.to_s.downcase == 'voicemailaccount'
return self.destination
end
end
def destination_greeting=(destination_file)
- if self.destinationable_type.downcase == 'voicemailaccount'
+ if self.destinationable_type.to_s.downcase == 'voicemailaccount'
self.destination = destination_file
end
end