Closed AndreiMotinga closed 6 years ago
~UPDATE:~ skip to UPDATE 2
It seems ckeditor needs ApplicationController to render layout. Workaround is to create application controller that inherits from base, as in
class ApplicationController < ActionController::Base
end
and create separate controller for api use, as in
class ApiController < ActionController::API
end
and use it for api controllers. I suppose it's more of a ckeditor in general issue than of this gem.
UPDATE 2: Better workaround
ckeditor provides way to set controller to use, so in case of using api only mode and administrate gem you can create config/initializers/ckeditor.rb
with
Ckeditor.setup do |config|
config.parent_controller = "Admin::ApplicationController"
end
This way you can keep your api controllers intact.
Thanks for raising this issue @AndreiMotinga, hopefully it'll help future Googlers!
Cheers, Rikki
Hey folks, thank you for the gem.
I'm trying to deploy new and shiny rails 5.2 api only app to Heroku. I added administrate and administrate-field-ckeditor.
Deploy succeeds, but app can't start with
There aren't much of the docs to go by... and since It's only API mode, I'm not sure what to do about the 'layout' thing. Was hoping you can provide some valuable input.
Best, Andrei