osem-fcy/app/views/admin/registrations/index.pdf.prawn
Shubhankar Deshpande e72af56649 Update index.pdf.prawn
Removed attending_social_events attribute from the prawn file. The same question "Are you attending social events?" could possibly now be asked as a custom question.
2015-02-13 07:17:43 +05:30

29 lines
816 B
Ruby

prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
table_array = []
header_array = [" ",
"Name",
"Email",
"Attending With Partner",
"Arrival Date",
"Departure Date"]
table_array << header_array
@registrations.each do |registration|
row = []
row << ""
row << registration.name
row << registration.email
end
if registration.attending_with_partner.to_s
row << "X"
else
row << " "
end
row << registration.arrival.to_s
row << registration.departure.to_s
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