Sha256: 7455037cf1c939864137b655ea7c213758fead8eb4878aaa60511cac628638d1

Contents?: true

Size: 466 Bytes

Versions: 71

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

wb = xlsx_package.workbook
wb.add_worksheet(name: @clase_modelo.nombre_plural) do |sheet|
  headers = atributos_para_listar.map { |a, _sort_by| @clase_modelo.human_attribute_name(a) }
  headers.prepend 'ID interno'
  sheet.add_row(headers)

  @collection.decorate.each do |object|
    array = atributos_para_listar.map do |att, _sort_by|
      object.send(att)
    end
    array.prepend object.to_key
    sheet.add_row array
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
pg_rails-7.1.16 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.15 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.14 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.13 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.12 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.11 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.10 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.9 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.8 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.7 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
pg_rails-7.1.6 pg_engine/app/views/pg_engine/base/download.xlsx.axlsx