如何在rails_admin上使用CKEditor上传图像?

时间:2011-06-15 17:07:19

标签: ruby-on-rails ckeditor rails-admin

有没有办法做到这一点?

我找到了CKFinder,但似乎它在轨道上不起作用。

1 个答案:

答案 0 :(得分:0)

我通过在config / initailizers

中将以下内容添加到我的rails_admin.rd来实现它
   config.model Page do
  #   # Found associations:

  #   # Found columns:
  #     field :id, :integer 
       field :title, :string 
       field :menu, :string 
  #     field :parent_id, :integer 
       field :live, :boolean
       field :orderby, :integer 
       field :content, :text do
        ckeditor true
      end 
  #     field :created_at, :datetime 
  #     field :updated_at, :datetime 
  #   # Sections:
     list do; end
     export do; end
     show do; end
     edit do; end
     create do; end
     update do; end
   end