summaryrefslogtreecommitdiffstats
path: root/registration.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-11-01 13:38:51 +0100
committerHarald Eilertsen <haraldei@anduin.net>2015-11-01 13:39:44 +0100
commiteef0dae084b64686658549265345fdd94b16fdf3 (patch)
treebb95865088ff94ac84fe65ddb3fc8ceac79ddd71 /registration.rb
parent5931fa9d67624943594968a10a4b38a682bf374c (diff)
downloadnorsk-urskog-registrations-eef0dae084b64686658549265345fdd94b16fdf3.tar.gz
norsk-urskog-registrations-eef0dae084b64686658549265345fdd94b16fdf3.tar.bz2
norsk-urskog-registrations-eef0dae084b64686658549265345fdd94b16fdf3.zip
Include url to generated pdf in email.
Diffstat (limited to 'registration.rb')
-rw-r--r--registration.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/registration.rb b/registration.rb
index ac1a362..fe0ce40 100644
--- a/registration.rb
+++ b/registration.rb
@@ -21,8 +21,9 @@ class RegistrationApp < Sinatra::Base
if request.form_data?
@band = Band.new(request['band'])
if @band.valid?
- generate_pdf_for(@band, File.join(settings.public_folder, "uploads", create_pdf_file_name(@band)))
- send_registration_emails_for @band
+ pdf_file = File.join("uploads", create_pdf_file_name(@band))
+ generate_pdf_for(@band, File.join(settings.public_folder, pdf_file))
+ send_registration_emails_for(@band, url_for(pdf_file))
erb :submitted
else
erb :index