changeset 1400:581999ce44ea luisf

Fixed mail bug (due to ActionMailer changes in Rails 3),
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 30 Sep 2013 13:51:33 +0100
parents 67abd7b08753
children 95bdaaab97ca
files plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb	Thu Sep 26 11:44:57 2013 +0100
+++ b/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb	Mon Sep 30 13:51:33 2013 +0100
@@ -4,7 +4,7 @@
   module MailerPatch
       def self.included(base) # :nodoc:
 
-        # Builds a tmail object used to email the specified user that a publication was created and the user is 
+        # Builds a tmail object used to email the specified user that a publication was created and the user is
         # an author of that publication
         #
         # Example:
@@ -16,16 +16,15 @@
           @project = project
 
           set_language_if_valid user.language
-          recipients user.mail
-          subject l(:mail_subject_publication_added, Setting.app_title)
-          body :publication_url => url_for( :controller => 'publications', :action => 'show', :id => publication.id ),
-              :publication_title => publication.title
 
-          render_multipart('publication_added', body)
+          mail :to => user.mail,
+          :subject => l(:mail_subject_register, Setting.app_title)
 
+          @publication_url = url_for( :controller => 'publications', :action => 'show', :id => publication.id )
+          @publication_title = publication.title
         end
-        
-        
+
+
     end
   end
 end