Class: Ckeditor::AttachmentFilesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/ckeditor/attachment_files_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
# File 'app/controllers/ckeditor/attachment_files_controller.rb', line 8

def create
  @attachment = Ckeditor::AttachmentFile.new
 respond_with_asset(@attachment)
end

#destroyObject



13
14
15
16
# File 'app/controllers/ckeditor/attachment_files_controller.rb', line 13

def destroy
  @attachment.destroy
  respond_with(@attachment, :location => ckeditor_attachment_files_path)
end

#indexObject



3
4
5
6
# File 'app/controllers/ckeditor/attachment_files_controller.rb', line 3

def index
  @attachments = Ckeditor.attachment_file_model.find_all(ckeditor_attachment_files_scope)
  respond_with(@attachments)
end