Sha256: 7a180054dd11d02f998f5da9f68d1ff7e3cda7fd122fdf047dfac6f406455a86
Contents?: true
Size: 470 Bytes
Versions: 8
Compression:
Stored size: 470 Bytes
Contents
module Ruby2xlsx class Xrb # Default format used by Excel builder. class_attribute :default_format self.default_format = ::Mime::XLSX def call(template) %{ controller.send_data ::Ruby2xlsx::Template.new(#{template.source.inspect}).render(self, assigns.merge(local_assigns)), :filename => [controller.action_name, ".xls"].join, :type => "application/vnd.ms-excel", :disposition => "attachment" } end end end
Version data entries
8 entries across 8 versions & 2 rubygems