Sha256: 99ce4a1c15c9193d94866217de38c00e11221dd2512d513319cba74925aa2139

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

class Ecm::Downloads::Backend::DownloadsController < Itsf::Backend::Resource::BaseController
  def self.resource_class
    Ecm::Downloads::Download
  end

  def download
    @download = Ecm::Downloads::Download.friendly.find(params[:id]).decorate
    redirect_to @download.asset.expiring_url(100)
  end

  private

  def permitted_params
    params
      .require(:download)
      .permit(:download_category_id, :asset, :name, :description, :published)
  end

  def load_resource
    load_scope.friendly.find(params[:id])
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecm_downloads2_backend-2.0.2 app/controllers/ecm/downloads/backend/downloads_controller.rb
ecm_downloads2_backend-2.0.1 app/controllers/ecm/downloads/backend/downloads_controller.rb