Search code examples
ruby-on-railsckeditorpapercliprails-admin

Rails_admin- ckeditor config.js is not overwriting nor paperclip running


I integrated my application with rails_admin, and I put the ckeditor in one of the forms, I followed all the steps of the official documentation on github but it is not accepting my config.js, I reduced the amount of options because it was not necessary to have all but It is showing the default (full). And also not uploading photos, I tried the paperclip. Anyone have any idea why this is happening, and how can I resolve it? Im using rails 5.1


Solution

  • I got it sorted out. After putting the gems in the Gemfile, and installing, I generated the ckeditor model, as it is in the tutorial. To get it to pick up my settings, I put it in initializers/rails_admin.rb    

    field: field,: ck_editor,: ckeditor => {: toolbar => 'mini'}
    

    and also

        

    field: field,: config_js ck_editor base_location + "page.js" end
    

    I put it in initializers/assets.rb

        

    Rails.application.config.assets.precompile + =% w (ckeditor / *)