Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with rails_admin on Rails 4.1.0 and Ruby 2.1.1? #147

Open
werk42 opened this issue Apr 15, 2014 · 1 comment
Open

Issue with rails_admin on Rails 4.1.0 and Ruby 2.1.1? #147

werk42 opened this issue Apr 15, 2014 · 1 comment
Labels

Comments

@werk42
Copy link

werk42 commented Apr 15, 2014

Hello everyone.

I tried using Rich with rails_admin following the documentation here. Rich wouldn't work until I changed :rich_editor to :ck_editor. It wouldn't load CKEDITOR until that, it was showing Uncaught ReferenceError: CKEDITOR is not defined, in the console log. Here's the solution that worked for me (in rails_admin.rb):

  config.model Post do
    edit do
      field :title
      field :body, :ck_editor do
        config({
          :insert_many => true
        })
      end
    end
  end

Is this a compatibility issue or I did something wrong on the way?

EDIT 2: The first time I open /admin I get this, but it's gone after page reload.

NoMethodError (undefined method `config' for #<RailsAdmin::Config::Fields::Types::CKEditor:0x00000004e1cd88>):
  config/initializers/rails_admin.rb:39:in `block (4 levels) in <top (required)>'
  config/initializers/rails_admin.rb:38:in `block (3 levels) in <top (required)>'
  config/initializers/rails_admin.rb:36:in `block (2 levels) in <top (required)>'

EDIT: I'm using the latest version of Rich gem.

@renews renews added the Urgent label Jun 18, 2014
@david1497
Copy link

david1497 commented Jun 9, 2016

Your config must be:

config.model Post do
      edit do
        field :body, :ck_editor, :text do
          label 'body'
        end
      end
    end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants