app/controllers/alchemy/admin/attachments_controller.rb in alchemy_cms-4.1.2 vs app/controllers/alchemy/admin/attachments_controller.rb in alchemy_cms-4.2.0.rc1
- old
+ new
@@ -2,10 +2,11 @@
module Alchemy
module Admin
class AttachmentsController < ResourcesController
include UploaderResponses
+ include ArchiveOverlay
helper 'alchemy/admin/tags'
def index
@query = Attachment.ransack(search_filter_params[:q])
@@ -80,21 +81,9 @@
def handle_uploader_response(status:)
if @attachment.valid?
render successful_uploader_response(file: @attachment, status: status)
else
render failed_uploader_response(file: @attachment)
- end
- end
-
- def in_overlay?
- params[:content_id].present?
- end
-
- def archive_overlay
- @content = Content.find_by(id: params[:content_id])
- respond_to do |format|
- format.html { render partial: 'archive_overlay' }
- format.js { render action: 'archive_overlay' }
end
end
def attachment_attributes
params.require(:attachment).permit(:file, :name, :file_name, :tag_list)