Results of running self.class.ancestors
in different types of controllers.
Please note the position of ActionView::Rendering
with respect to the rendering modules that are present in all cases (ActionController::Renderers::All
, ActionController::Renderers
and ActionController::Rendering
)
1- Controller inheriting from ActionController::Base
[
...
ActionController::Renderers::All,
ActionController::Renderers,
ActionController::Rendering,
ActionView::Layouts,
ActionView::Rendering,
...
]
2- Controller inheriting from ActionController::API
with jbuilder included (before fixing the issue)
[
...
ActionView::Rendering,
...
ActionController::Renderers::All,
ActionController::Renderers,
ActionController::Rendering,
ActionController::ApiRendering,
...
]
3- Controller inheriting from ActionController::API
with jbuilder included (fixed)
[
...
ActionController::Renderers::All,
ActionController::Renderers,
ActionController::Rendering,
ActionController::ApiRendering,
ActionView::Rendering,
...
]
After the fix, the relative order of the rendering modules present on both type of controllers, AC::Base and AC::API, is preserved.