Skip to content

Instantly share code, notes, and snippets.

View brittanys's full-sized avatar
🎯
Focusing

Brittany Wood brittanys

🎯
Focusing
View GitHub Profile
pdf_template = "pdfs/agency_pdf/print.html.haml"
action_view = ActionView::Base.new()
action_view.view_paths = ActionController::Base.view_paths
#AgencyPlan.where(season: season).last.each do |agency_plan|
agency_plan = AgencyPlan.where(season: 2016).last
agency_plan_decorator = AgencyPlanPdfPresenter.new(agency_plan.agency_plannable_id)
body = action_view.render(template: pdf_template, locals: {agency_plan: agency_plan_decorator})