app/controllers/ckeditor/pictures_controller.rb in ckeditor-4.1.1 vs app/controllers/ckeditor/pictures_controller.rb in ckeditor-4.1.2

- old
+ new

@@ -2,20 +2,26 @@ 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?) + respond_to do |format| + format.html { render :layout => @pictures.first_page? } + end end def create @picture = Ckeditor.picture_model.new respond_with_asset(@picture) end def destroy @picture.destroy - respond_with(@picture, :location => pictures_path) + + respond_to do |format| + format.html { redirect_to pictures_path } + format.json { render :nothing => true, :status => 204 } + end end protected def find_asset