Sha256: e66a154c7738e72b2624342cf5cb5467866e5c646f9fdefe91ddff49399eb0ba
Contents?: true
Size: 1.26 KB
Versions: 59
Compression:
Stored size: 1.26 KB
Contents
class Emailer < ActionMailer::Base include UmlautConfigurable self.umlaut_config = UmlautController.umlaut_config helper :application def citation(recipient, user_request, fulltexts, holdings) @title = find_good_title(user_request.referent) @fulltexts = fulltexts @holdings = holdings @user_request = user_request mail(:to => recipient, :from => umlaut_config.from_email_addr, :'Reply-to' => umlaut_config.from_email_addr, :subject => "#{umlaut_config.app_name} result: #{find_good_title(user_request.referent)}") end def short_citation(recipient, user_request, location, call_number) @title = find_good_title(user_request.referent) @location = location @call_number = call_number @user_request = user_request mail(:to => recipient, :from => umlaut_config.from_email_addr, :'Reply-to' => umlaut_config.from_email_addr, :subject => "#{umlaut_config.app_name} result") end protected def find_good_title(referent) citation = referent.to_citation if citation[:container_title] return citation[:container_title] else return "#{citation[:title]} / #{citation[:author]}" end end end
Version data entries
59 entries across 59 versions & 1 rubygems