Sha256: 423218d00bb5df5baecf2698bee26929cfca5a1c4c02888b52202b2504a71322
Contents?: true
Size: 652 Bytes
Versions: 2
Compression:
Stored size: 652 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(:ecm_downloads_download) .permit(:ecm_downloads_download_category_id, :asset, :name, :description, :published) end def collection_scope resource_class.includes(:ecm_downloads_download_category) 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-1.1.0 | app/controllers/ecm/downloads/backend/downloads_controller.rb |
ecm_downloads2_backend-1.0.3 | app/controllers/ecm/downloads/backend/downloads_controller.rb |