Class: Ckeditor::PicturesController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  @picture = Ckeditor.image_model.new
 respond_with_asset(@picture)
end

#destroyObject



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

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

#edit_imagesObject



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

def edit_images
   @pictures = Ckeditor.image_model.order("id DESC")
   respond_with(@pictures)
end

#indexObject



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

def index
  @pictures = Ckeditor.image_model.order("id DESC")
  respond_with(@pictures) 
end