Sha256: f52c7760dbaab602242c83436f81017cc4b0a5a72b44d9129732e58bd2118733
Contents?: true
Size: 807 Bytes
Versions: 2
Compression:
Stored size: 807 Bytes
Contents
# frozen_string_literal: true module Zizia class PreIngestWorksController < ::ApplicationController before_action :merge_abilities load_and_authorize_resource def thumbnails pre_ingest_work = Zizia::PreIngestWork.where(deduplication_key: pre_ingest_works_params[:deduplication_key]).first @thumbnails = if pre_ingest_work pre_ingest_work.thumbnails else [] end respond_to do |format| format.json { render json: { thumbnails: @thumbnails } } end end private def pre_ingest_works_params params.permit(:deduplication_key, :format) end def merge_abilities current_ability.merge(Zizia::Ability.new(current_user)) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
zizia-5.5.0 | app/controllers/zizia/pre_ingest_works_controller.rb |
zizia-5.4.0 | app/controllers/zizia/pre_ingest_works_controller.rb |