require_relative 'band' require_relative 'pdf_form' require 'mail' def send_registration_emails_for(band) mail = Mail.new mail.charset = 'UTF-8' mail.to = 'haraldei@anduin.net' mail.from = @band.contact.email mail.subject = "Registrering av band #{@band.name} til Norsk Urskog" mail.body = 'Neijassådu!' mail.deliver! end def generate_pdf_for(band, filename) pdf = PDFForm.new(band) pdf.render(filename) end def create_pdf_file_name(band) filename = "#{Date.today.iso8601}-#{band.name}-#{band.city}.pdf" end