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