Sha256: 3a24c713823c83f0ae05f18cbb2d2a86fdef5646f027c8c9b2bbedbc2bf56b55

Contents?: true

Size: 331 Bytes

Versions: 4

Compression:

Stored size: 331 Bytes

Contents

module ESV
  MIME_TYPE = "application/vnd.ms-excel"
  CONTENT_TYPE = "#{MIME_TYPE}; charset=utf-8"

  module RailsController
    private

    def send_excel(data, filename: nil)
      send_data(
        data,
        type: ESV::CONTENT_TYPE,
        disposition: "attachment",
        filename: filename,
      )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
excel-esv-3.0.1 lib/esv/rails_controller.rb
excel-esv-3.0.0 lib/esv/rails_controller.rb
excel-esv-2.0.0 lib/esv/rails_controller.rb
excel-esv-1.0.0 lib/esv/rails_controller.rb