Class: Ckeditor::PicturesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Ckeditor::PicturesController
- Defined in:
- app/controllers/ckeditor/pictures_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 |
# File 'app/controllers/ckeditor/pictures_controller.rb', line 14 def create @picture = Ckeditor.picture_model.new respond_with_asset(@picture) end |
#destroy ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/controllers/ckeditor/pictures_controller.rb', line 19 def destroy @picture.destroy respond_to do |format| format.html { redirect_to pictures_path } format.json { render :nothing => true, :status => 204 } end end |
#index ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/ckeditor/pictures_controller.rb', line 5 def index @pictures = Ckeditor.picture_adapter.find_all(ckeditor_pictures_scope) @pictures = Ckeditor::Paginatable.new(@pictures).page(params[:page]) respond_to do |format| format.html { render :layout => @pictures.first_page? } end end |