]> git.openstreetmap.org Git - rails.git/commitdiff
Cope with MESSAGES_DOMAIN not being defined
authorTom Hughes <tom@compton.nu>
Wed, 16 Mar 2011 22:19:35 +0000 (22:19 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 14 Nov 2011 09:42:48 +0000 (09:42 +0000)
app/models/notifier.rb

index 0593776393643e5bf8b239da4abc98d688bdb0d7..03923e9e71e2db8525971e3a55ffba713f679f77 100644 (file)
@@ -116,7 +116,7 @@ class Notifier < ActionMailer::Base
 private
 
   def from_address(name, type, id, digest)
-    if domain = MESSAGES_DOMAIN
+    if Object.const_defined?(:MESSAGES_DOMAIN) and domain = MESSAGES_DOMAIN
       "#{name} <#{type}-#{id}-#{digest[0,6]}@#{domain}>"
     else
       EMAIL_FROM