Sha256: 059d8c6fdcbc6eaa5c5f550a5ed25c798b498d0cc77d2520753696fe5732be23

Contents?: true

Size: 287 Bytes

Versions: 2

Compression:

Stored size: 287 Bytes

Contents

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

  module RailsController
    private

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
excel-esv-0.0.2 lib/esv/rails_controller.rb
excel-esv-0.0.1 lib/esv/rails_controller.rb