diff --git a/app/pdfs/picklists_pdf.rb b/app/pdfs/picklists_pdf.rb index b786bca735..2e52fc3843 100644 --- a/app/pdfs/picklists_pdf.rb +++ b/app/pdfs/picklists_pdf.rb @@ -4,8 +4,8 @@ class PicklistsPdf include ItemsHelper def initialize(organization, requests) - @requests = requests # does this need to be Request.includes(XXX).etc? Investigate. - @organization = organization# temporary for single picklist only + @requests = requests + @organization = organization end def compute_and_render @@ -16,10 +16,10 @@ def compute_and_render @requests.each do |request| logo_image = if @organization.logo.attached? - StringIO.open(@organization.logo.download) - else - Organization::DIAPER_APP_LOGO - end + StringIO.open(@organization.logo.download) + else + Organization::DIAPER_APP_LOGO + end # Bounding box containing non-footer elements bounding_box [bounds.left, bounds.top], width: bounds.width, height: bounds.height - footer_height do @@ -90,8 +90,8 @@ def compute_and_render # Line item table table(data) do self.header = true - self.cell_style = { padding: [5, 10, 5, 10]} - self.row_colors = %w(dddddd ffffff) + self.cell_style = {padding: [5, 10, 5, 10]} + self.row_colors = %w[dddddd ffffff] cells.borders = [] @@ -100,7 +100,7 @@ def compute_and_render row(0).border_width = 2 row(0).font_style = :bold row(0).size = 10 - row(0).column(1..-1).borders = %i(bottom left) + row(0).column(1..-1).borders = %i[bottom left] end end @@ -125,9 +125,9 @@ def compute_and_render end number_pages "Page of ", - start_count_at: 1, - at: [bounds.right - 130, 22], - align: :right + start_count_at: 1, + at: [bounds.right - 130, 22], + align: :right render end @@ -165,6 +165,4 @@ def data_no_units(items) ""] end end -end - - +end \ No newline at end of file