app/controllers/ckeditor/pictures_controller.rb in glebtv-ckeditor-4.11.1 vs app/controllers/ckeditor/pictures_controller.rb in glebtv-ckeditor-4.13.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
class Ckeditor::PicturesController < Ckeditor::ApplicationController
skip_before_action :verify_authenticity_token, only: :create, raise: false
def index
@pictures = Ckeditor.picture_adapter.find_all(ckeditor_pictures_scope)
@@ -14,11 +16,9 @@
@picture = Ckeditor.picture_model.new
respond_with_asset(@picture)
end
def destroy
- return false unless Ckeditor.can_delete
-
@picture.destroy
respond_to do |format|
format.html { redirect_to pictures_path }
format.json { render json: @picture, status: 204 }