Class: Shimmer::SitemapsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/shimmer/controllers/sitemaps_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
9
10
# File 'lib/shimmer/controllers/sitemaps_controller.rb', line 5

def show
  path = request.path[1..]
  filename = path.gsub("/", "-")

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