Sha256: 5d4fa5b0ae5982bc5978b7b6d8b919ddc534f0645700d6548e0012ed207ed661
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController skip_before_filter :verify_authenticity_token, only: :create def index @attachments = Ckeditor.attachment_file_adapter.find_all(ckeditor_attachment_files_scope) @attachments = Ckeditor::Paginatable.new(@attachments).page(params[:page]) respond_to do |format| format.html { render :layout => @attachments.first_page? } end end def create @attachment = Ckeditor.attachment_file_model.new respond_with_asset(@attachment) end def destroy return false unless Ckeditor.can_delete @attachment.destroy respond_to do |format| format.html { redirect_to attachment_files_path } format.json { render :nothing => true, :status => 204 } end end protected def find_asset @attachment = Ckeditor.attachment_file_adapter.get!(params[:id]) end def authorize_resource model = (@attachment || Ckeditor.attachment_file_model) @authorization_adapter.try(:authorize, params[:action], model) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glebtv-ckeditor-4.5.10.2 | app/controllers/ckeditor/attachment_files_controller.rb |