Sha256: 24c96bdd701a809c8cefdc5ceaa285c92a6051f172a530696b4a8a35d258fbd1

Contents?: true

Size: 491 Bytes

Versions: 8

Compression:

Stored size: 491 Bytes

Contents

class Ecm::Downloads::DownloadsController < Ecm::Downloads::Configuration.base_controller.constantize
  # Support secured downloads with expiring urls on S3.
  def download
    @download = Ecm::Downloads::Download.published.find(params[:id]).decorate
    redirect_to @download.asset.expiring_url(100)
  end

  def index
    @downloads = Ecm::Downloads::Download.published.all.decorate
  end

  def show
    @download = Ecm::Downloads::Download.published.find(params[:id]).decorate
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ecm_downloads2-2.0.2 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-2.0.0 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-1.2.2 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-1.2.1 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-1.2.0 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-1.1.1 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-1.1.0 app/controllers/ecm/downloads/downloads_controller.rb
ecm_downloads2-1.0.0 app/controllers/ecm/downloads/downloads_controller.rb