38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
|
|
prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
|
||
|
|
table_array = []
|
||
|
|
header_array = [" ",
|
||
|
|
"Last Name",
|
||
|
|
"First Name",
|
||
|
|
"Public Name",
|
||
|
|
"Email",
|
||
|
|
"Attending Social Events",
|
||
|
|
"Attending With Partner",
|
||
|
|
"Arrival Date",
|
||
|
|
"Departure Date"]
|
||
|
|
table_array << header_array
|
||
|
|
@registrations.each do |registration|
|
||
|
|
row = []
|
||
|
|
row << ""
|
||
|
|
row << registration.last_name
|
||
|
|
row << registration.first_name
|
||
|
|
row << registration.public_name
|
||
|
|
row << registration.email
|
||
|
|
if registration.attending_social_events
|
||
|
|
row << "X"
|
||
|
|
else
|
||
|
|
row << " "
|
||
|
|
end
|
||
|
|
|
||
|
|
if registration.attending_social_events_with_partner.to_s
|
||
|
|
row << "X"
|
||
|
|
else
|
||
|
|
row << " "
|
||
|
|
end
|
||
|
|
row << registration.arrival
|
||
|
|
row << registration.departure
|
||
|
|
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}
|
||
|
|
end
|