Mercurial > hg > soundsoftware-site
view vendor/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb @ 899:5d5943de529f bug_367
Fixed Bug #367.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 02 Feb 2012 15:20:50 +0000 |
parents | 865d079e5fa0 |
children |
line wrap: on
line source
require_dependency 'mailer' module Bibliography 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 # an author of that publication # # Example: # publication_added(user) => tmail object # Mailer.deliver_add_to_project(user) => sends an email to the registered user def publication_added(user, publication, project) @publication = publication @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) end end end end