Sha256: e748e8a69d3ddbbc3f298e118308623cbcc70efb117407250e5689e2a4f579f7

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

class Ckeditor::AttachmentsController < Ckeditor::BaseController

  def index
    @attachments = Ckeditor.file_model.order("id DESC")
    respond_with(@attachments)
  end
  
  def create
    @attachment = Ckeditor.file_model.new
	  respond_with_asset(@attachment)
  end
  
  def destroy
    @attachment.destroy
    respond_with(@attachment, :location => ckeditor_attachments_path)
  end
  
  protected
  
    def find_asset
      @attachment = Ckeditor.file_model.find(params[:id])
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ckeditor-3.5.2 app/controllers/ckeditor/attachments_controller.rb
ckeditor-3.5.1 app/controllers/ckeditor/attachments_controller.rb