Sha256: 351a7cbf02635435212d591c5589056edbaa9de2a1cc4dc757214ec47dc87793

Contents?: true

Size: 714 Bytes

Versions: 21

Compression:

Stored size: 714 Bytes

Contents

class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController

  def index
    @attachments = Ckeditor.attachment_file_model.find_all(ckeditor_attachment_files_scope)
    respond_with(@attachments)
  end
  
  def create
    @attachment = Ckeditor::AttachmentFile.new
	  respond_with_asset(@attachment)
  end
  
  def destroy
    @attachment.destroy
    respond_with(@attachment, :location => attachment_files_path)
  end
  
  protected
  
    def find_asset
      @attachment = Ckeditor.attachment_file_model.get!(params[:id])
    end

    def authorize_resource
      model = (@attachment || Ckeditor::AttachmentFile)
      @authorization_adapter.try(:authorize, params[:action], model)
    end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
glebtv-ckeditor-4.2.1.5 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.2.1.4 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.2.1.3 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.2.1.2 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.2.1.1 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.2.1 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.7 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.6 app/controllers/ckeditor/attachment_files_controller.rb
ckeditor-4.0.6 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.5 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.4 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.3 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.2 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1.1 app/controllers/ckeditor/attachment_files_controller.rb
glebtv-ckeditor-4.1.1 app/controllers/ckeditor/attachment_files_controller.rb
ckeditor-4.0.4 app/controllers/ckeditor/attachment_files_controller.rb
ckeditor-4.0.2 app/controllers/ckeditor/attachment_files_controller.rb
ckeditor-4.0.1 app/controllers/ckeditor/attachment_files_controller.rb
ckeditor-4.0.0 app/controllers/ckeditor/attachment_files_controller.rb
ckeditor-4.0.0.rc2 app/controllers/ckeditor/attachment_files_controller.rb