Class: DocumentExporter::Pdf::TeacherMaterial
- Defined in:
- lib/document_exporter/pdf/teacher_material.rb
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from Base
#included_materials, #initialize, #ordered_materials, pdf_key
Constructor Details
This class inherits a constructor from DocumentExporter::Base
Instance Method Details
#export ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/document_exporter/pdf/teacher_material.rb', line 6 def export content = super pdf = CombinePDF.parse(content) scope = @document.teacher_materials.where(id: included_materials) material_ids = ordered_materials scope.pluck(:id) pdf = combine_pdf_for pdf, material_ids pdf.to_pdf end |