Sha256: 0ad97a672cb3489b18be3634a9fb826215cea841ac6be533641fc5695b397114

Contents?: true

Size: 330 Bytes

Versions: 4

Compression:

Stored size: 330 Bytes

Contents

# frozen_string_literal: true

module Shimmer
  class SitemapsController < ActionController::Base
    def show
      path = request.path[1..]
      filename = path.gsub("/", "-")

      send_data ActiveStorage::Blob.service.download(path), filename: filename, type: "application/gzip", disposition: "attachment"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shimmer-0.0.41 lib/shimmer/controllers/sitemaps_controller.rb
shimmer-0.0.40 lib/shimmer/controllers/sitemaps_controller.rb
shimmer-0.0.39 lib/shimmer/controllers/sitemaps_controller.rb
shimmer-0.0.38 lib/shimmer/controllers/sitemaps_controller.rb