當我嘗試上載的CKEditor的圖像出現錯誤WARNING: Can't verify CSRF token authenticity
及以下:警告:無法驗證CSRF與CKEditor的圖像標記真實性上傳
Started POST "/ckeditor/attachment_files?CKEditor=blog_entry_body&CKEditorFuncNum=1&langCode=en" for 127.0.0.1 at 2013-05-28 18:38:57 -0500
Processing by Ckeditor::AttachmentFilesController#create as HTML
Parameters: {"upload"=>#<ActionDispatch::Http::UploadedFile:0x0000000231fef0 @original_filename="me.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"upload\"; filename=\"me.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<Tempfile:/tmp/RackMultipart20130528-13870-17wbprr>>, "CKEditor"=>"blog_entry_body", "CKEditorFuncNum"=>"1", "langCode"=>"en"}
WARNING: Can't verify CSRF token authenticity
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" = 'M96bQAv-NGdidsn7hypOJA' LIMIT 1
(0.1ms) BEGIN
(0.2ms) ROLLBACK
Rendered text template (0.0ms)
Completed 200 OK in 7ms (Views: 0.8ms | ActiveRecord: 0.7ms)
它看起來像是在Ckeditor::AttachmentFilesController#create
發生。但是我沒有看到這個控制器在我安裝CKEditor gem時生成。我在另一篇文章中發現,我必須skip_before_filter :verify_authenticity_token
,但就像我說的,我沒有看到Ckeditor::AttachmentFilesController#create
。