2013-01-07 09:04:09 +01:00
|
|
|
prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
|
|
|
|
|
table_array = []
|
|
|
|
|
header_array = [" ",
|
2014-06-23 19:07:50 +03:00
|
|
|
"Name",
|
2013-01-07 09:04:09 +01:00
|
|
|
"Email",
|
|
|
|
|
"Attending Social Events",
|
|
|
|
|
"Attending With Partner",
|
|
|
|
|
"Arrival Date",
|
|
|
|
|
"Departure Date"]
|
|
|
|
|
table_array << header_array
|
|
|
|
|
@registrations.each do |registration|
|
|
|
|
|
row = []
|
|
|
|
|
row << ""
|
2014-06-23 19:07:50 +03:00
|
|
|
row << registration.name
|
2013-01-07 09:04:09 +01:00
|
|
|
row << registration.email
|
|
|
|
|
if registration.attending_social_events
|
|
|
|
|
row << "X"
|
|
|
|
|
else
|
|
|
|
|
row << " "
|
|
|
|
|
end
|
|
|
|
|
|
2013-02-06 20:26:41 +01:00
|
|
|
if registration.attending_with_partner.to_s
|
2013-01-07 09:04:09 +01:00
|
|
|
row << "X"
|
|
|
|
|
else
|
|
|
|
|
row << " "
|
|
|
|
|
end
|
2013-05-07 14:46:33 +02:00
|
|
|
row << registration.arrival.to_s
|
|
|
|
|
row << registration.departure.to_s
|
2013-01-07 09:04:09 +01:00
|
|
|
table_array << row
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
pdf.text "#{@conference.title} Registrations", :font_size => 25
|
|
|
|
|
pdf.table table_array, :header => true, :cell_style => {:size => 5, :border_width => 1}
|
2013-05-07 14:46:33 +02:00
|
|
|
end
|