Class: Ckeditor::AttachmentsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

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

#destroyObject



18
19
20
21
# File 'app/controllers/ckeditor/attachments_controller.rb', line 18

def destroy
  @attachment.destroy
  respond_with(@attachment)
end

#edit_filesObject



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

def edit_files
	@attachments = Ckeditor.file_model.order("id DESC")
	respond_with(@attachments)
end

#indexObject



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

def index
  @attachments = Ckeditor.file_model.order("id DESC")
  respond_with(@attachments)
end