]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/notifier.rb
Looks like @body is special somehow so use @text instead
[rails.git] / app / models / notifier.rb
index 0593776393643e5bf8b239da4abc98d688bdb0d7..2b6574a977aafd3926602af9e841d58bdaa166b0 100644 (file)
@@ -62,7 +62,7 @@ class Notifier < ActionMailer::Base
     @locale = message.recipient.preferred_language_from(I18n.available_locales)
     @to_user = message.recipient.display_name
     @from_user = message.sender.display_name
-    @body = message.body
+    @text = message.body
     @title = message.title
     @readurl = url_for(:host => SERVER_URL,
                        :controller => "message", :action => "read",
@@ -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