Why CanCan does not allow to upload images to the server (ckeditor)?

When uploading image to the server (ckeditor gem) a request is sent to Ckeditor::PicturesController#create (this controller is located in the Gema)

When it climbs error
CanCan::AuthorizationNotPerformed (This action failed the check_authorization because it does not authorize_resource. Add skip_authorization_check to bypass this check.

Of course, if you set Ckeditor::PicturesController line skip_authorization_check , then it will work. But how to avoid errors without resorting to emancipating.

Trying to abillity.rb to register
can :manage, Ckeditor::Picture
can :manage, Ckeditor::AttachmentFile

But it still does not help.
June 7th 19 at 14:37
0 answer

Find more questions by tags Ruby on RailsRuby