Class: Ckeditor::PicturesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ckeditor/pictures_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

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

#destroyObject



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

def destroy
  @picture.destroy
  respond_with(@picture, :location => pictures_path)
end

#indexObject



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

def index
  @pictures = Ckeditor.picture_model.find_all(ckeditor_pictures_scope)
  respond_with(@pictures) 
end