Sha256: 89137ef9f09cbc838498384469c8eace5685257d901b91486cd72a1736e17a10

Contents?: true

Size: 1.25 KB

Versions: 55

Compression:

Stored size: 1.25 KB

Contents

module Cmor
  module Files
    module Backend
      class AttachmentsController < Cmor::Core::Backend::ResourcesController::Base
        include Rao::ResourcesController::SortingConcern
        include Rao::ResourcesController::BatchActionsConcern

        def self.resource_class
          ActiveStorage::Attachment
        end

        # def destroy_many
        #   @collection = load_collection_scope.where(id: params[:ids])
        #   @collection.destroy_all

        #   respond_with @collection, location: after_destroy_many_location, noticse: t('.success')
        # end

        # def publish_many
        #   @collection = load_collection_scope.where(id: params[:ids])
        #   @collection.map(&:publish!)

        #   respond_with @collection, location: last_location, noticse: t('.success')
        # end

        # def unpublish_many
        #   @collection = load_collection_scope.where(id: params[:ids])
        #   @collection.map(&:unpublish!)

        #   respond_with @collection, location: last_location, noticse: t('.success')
        # end

        private

        def after_destroy_many_location
          last_location
        end

        def permitted_params
          params.require(:attachment).permit()
        end
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
cmor_files_backend-0.0.58.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.57.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.56.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.55.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.54.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.53.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.52.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.51.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.50.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.49.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.48.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.45.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.44.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.43.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.42.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.41.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.40.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.39.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.38.pre app/controllers/cmor/files/backend/attachments_controller.rb
cmor_files_backend-0.0.37.pre app/controllers/cmor/files/backend/attachments_controller.rb