Sha256: 4f20cfb4c47dcabff532b26b52fdaa8a6a6f6ed407c49d1fa15780432348fa4a
Contents?: true
Size: 484 Bytes
Versions: 1
Compression:
Stored size: 484 Bytes
Contents
# frozen_string_literal: true class NeetoEditor::Api::V1::DirectUploadsController < NeetoCommonsBackend::Api::DirectUploadsController before_action :destroy_editor_asset!, only: :destroy def attach blob = ActiveStorage::Blob.find(params[:id]) @organization.neeto_editor_assets.create!(blob_id: blob.id, file: blob) render_success end private def destroy_editor_asset! @organization.neeto_editor_assets.find_by_blob_id(@blob.id)&.destroy! end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
neeto-commons-backend-1.0.109 | app/controllers/neeto_editor/api/v1/direct_uploads_controller.rb |