app/controllers/ckeditor/pictures_controller.rb in glebtv-ckeditor-4.0.2.7 vs app/controllers/ckeditor/pictures_controller.rb in glebtv-ckeditor-4.1.1

- old
+ new

@@ -1,8 +1,7 @@ class Ckeditor::PicturesController < Ckeditor::ApplicationController - skip_before_filter :verify_authenticity_token - + def index @pictures = Ckeditor.picture_model.find_all(ckeditor_pictures_scope) respond_with(@pictures) end @@ -18,7 +17,12 @@ protected def find_asset @picture = Ckeditor.picture_model.get!(params[:id]) + end + + def authorize_resource + model = (@picture || Ckeditor::Picture) + @authorization_adapter.try(:authorize, params[:action], model) end end