# HG changeset patch # User luisf # Date 1380545600 -3600 # Node ID 5cb7eeccede15bc5fc58ce63927554ba28ea42ea # Parent 6106c49c5f50263f3a286cb0519d2a4fad537640# Parent 95bdaaab97caa5f278e17c584ddaf87e596038a7 merged from 'luisf' branch diff -r 6106c49c5f50 -r 5cb7eeccede1 plugins/redmine_bibliography/app/models/publication.rb --- a/plugins/redmine_bibliography/app/models/publication.rb Mon Sep 30 13:50:17 2013 +0100 +++ b/plugins/redmine_bibliography/app/models/publication.rb Mon Sep 30 13:53:20 2013 +0100 @@ -53,14 +53,14 @@ def notify_authors_publication_added(project) self.authors.each do |author| Rails.logger.debug { "Sending mail to \"#{self.title}\" publication authors." } - Mailer.deliver_publication_added(author.user, self, project) unless author.user.nil? + Mailer.publication_added(author.user, self, project).deliver unless author.user.nil? end end def notify_authors_publication_updated(project) self.authors.each do |author| Rails.logger.debug { "Sending mail to \"#{self.title}\" publication authors." } - Mailer.deliver_publication_updated(author.user, self, project) unless author.user.nil? + Mailer.publication_updated(author.user, self, project).deliver unless author.user.nil? end end diff -r 6106c49c5f50 -r 5cb7eeccede1 plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb --- a/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb Mon Sep 30 13:50:17 2013 +0100 +++ b/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb Mon Sep 30 13:53:20 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