我在使用ck編輯器的軌道上有數據庫mongo db。我跟着鏈接https://github.com/galetahub/ckeditor。我在ckeditor的幫助下成功地工作。 因爲我view.html.erb代碼是這樣的ckeditor在mongodb軌道上
<%= f.cktext_area :description, :toolbar => 'Easy', :width => 800, :height => 200 %><br>
和我的節目頁面
<%= [email protected] %>
它沒有文件的情況下工作。 我有我的模型attachment_file.rb是
class Ckeditor::AttachmentFile < Ckeditor::Asset
has_mongoid_attached_file :data,
:url => "/ckeditor_assets/attachments/:id/:filename",
:path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename"
validates_attachment_size :data, :less_than => 100.megabytes
validates_attachment_presence :data
def url_thumb
@url_thumb ||= Ckeditor::Utils.filethumb(filename)
end
end
它正在爲圖像的情況下而不是工作zip文件或任何attachement。當涉及到文件的情況下,它可以成功上傳文件的路徑。但要用戶下載該文件,它不工作。我的意思是後端適用於所有功能。但缺乏下載上傳文件停止通過
`javascript:void(0)/*130*/
正確的做法正在改變: 'gem'ckeditor'' 到 'gem'ckeditor',::git =>'git:// github.com/netoneko/ckeditor.git'' in your Gemfile –