Class: Ckeditor::PicturesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Ckeditor::PicturesController
- Defined in:
- app/controllers/ckeditor/pictures_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 |
# File 'app/controllers/ckeditor/pictures_controller.rb', line 10 def create @picture = Ckeditor.picture_model.new respond_with_asset(@picture) end |
#destroy ⇒ Object
15 16 17 18 |
# File 'app/controllers/ckeditor/pictures_controller.rb', line 15 def destroy @picture.destroy respond_with(@picture, :location => pictures_path) end |
#index ⇒ Object
3 4 5 6 7 8 |
# File 'app/controllers/ckeditor/pictures_controller.rb', line 3 def index @pictures = Ckeditor.picture_adapter.find_all(ckeditor_pictures_scope) @pictures = Ckeditor::Paginatable.new(@pictures).page(params[:page]) respond_with(@pictures, :layout => @pictures.first_page?) end |