yappbox/render_anywhere — pull request #21 by airatshigapov (2014-07-17 14:15:09+00:00)
Title: Inherit base RenderingController from ActionController::Metal

Take a look at [this](https://github.com/rails/rails/blob/master/actionpack/lib/abstract_controller/base.rb#L15) note about `AbstractController::Base`.

And [another one](https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal.rb#L42) about `ActionController::Metal`.

Recently I encountered some issues with `render_anywhere` gem upgrade (from 0.0.2 version). It includes `ActionController::Caching` from version [`0.0.5`](https://github.com/airatshigapov/render_anywhere/commit/a3d4a16585b988f88418457fd4d9459a0be397dc), and `ActionController::Caching` uses `ActionController::RackDelegation` which fails at [this line](https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/rack_delegation.rb#L17) since `response` variable is not available if we inherit our controller from just `AbstractController::Base`

I suggest to inherit `RenderingController` from `ActionController::Metal` if possible and if it doesn't break anything (it shouldn't I guess), since it *"is the simplest possible controller"* and it [fixes](https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal.rb#L128) the issue with `response` variable.