rails/rails — pull request #11396 by strzalek (2013-07-10 15:31:56+00:00)
Title: Split out AV from AP, part 2: extract renderers (WIP)

Hey,

This PR is a continuation of https://github.com/rails/rails/pull/11032.

I've moved all the rendering-related code to `ActionView` and added to its `railties` code that hooks all necessary things to `ActionPack` if the AV is loaded.

As straight forward as it sounds, it turned out it's not that easy. In the AP, all its components needs to be loaded in order. This introduced huge complication with loading AV stuff in railties as it was included at the end and needed to be included somewhere in the middle.

After discussing this issue with @drogus and @josevalim we agreed on simple solution - https://github.com/strzalek/rails/blob/fc89313fe3f9e508dbe84616fa9a91db123337b0/actionpack/lib/action_controller/base.rb#L164-168

With this code, we're now able to load `AV::Rendering` **between** `AbstractController::Rendering` and `ActionPack::Rendering` simply by:

```ruby
ActionPack::Base.superclass.send(:include, ...)
```

This PR is subject to discussion and WIP, not final solution.

What are your thoughts? Maybe you have other ideas how to abstract `ActionView` ?

/cc @drogus @josevalim @jeremy @wycats @spastorino @tenderlove