Sha256: 9d7ac3a44b586705e57054cfe4d0cafefe6c62ee9591e47e814ef29c29590cc5
Contents?: true
Size: 1.01 KB
Versions: 22
Compression:
Stored size: 1.01 KB
Contents
class FeedbackMailer < ActionMailer::Base add_template_helper(EmailerHelper) default from: UmlautController.umlaut_config.from_email_addr # feedback("findit.library.school.edu", "librarian@university.edu",:name => "Joe", :email => "joe@gmail.com", :feedback => "Whatever", :umlaut_request => urequest) # * umlaut_request is optional def feedback(host, to_address, options = {}) @host = host @umlaut_request = options[:umlaut_request] @name = options[:name] @email = options[:email] @feedback = options[:feedback] # Force permalink creation if we don't have one already if @umlaut_request && @umlaut_request.referent.permalinks.empty? permalink = Permalink.new_with_values!(@umlaut_request.referent, @umlaut_request.referrer_id) @umlaut_request.referent.permalinks << permalink @umlaut_request.save! end mail(:to => to_address, :subject => "#{UmlautController.umlaut_config.app_name} Feedback: #{options[:name]}", :reply_to => @email) end end
Version data entries
22 entries across 22 versions & 1 rubygems