…fault scope conditions
Changes in old branches needed to be manually synched in CHANGELOGs of newer ones. This has proven to be brittle, sometimes one just forgets this manual step. With this commit we switch to CHANGELOGs per branch. When a new major version is cut from master, the CHANGELOGs in master start being blank. A link to the CHANGELOG of the previous branch allows anyone interested to follow the history.
Nowadays circular autoloads do not work, but the user gets a NameError that says some constant is undefined. That's puzzling, because he is normally trying to autoload a constant he knows can be autoloaded. With this check we can give a better error message.
When running `rails generate controller --help` an example with creating a (singular) "CreditCard" controller is shown. The convention is to generate controllers with plural names though.
Methods provided by RecordIdentifier are not widely used in controllers nowadays as they're view specific (this is probably a legacy left after RJS rendering directly in controllers). However if people still need to use it, it's trivial to include ActionView::RecordIdentifier by themselves.
We extend it with self, but the methods were not working properly were used directly on module.
ActionDispatch::Routing::UrlFor was always required in UrlHelpers. This was changed by splitting previous implementation of UrlHelper into 2 modules: ActionView::Helpers::UrlHelper and ActionView::Routing::UrlHelper. The former one keeps only basic implementation of url_for. The latter adds features that allow to use routes and is only required when url_helpers or mounted_helpers are required.
default_formats array is used by LookupContext in order to allow rendering templates when :formats option is not passed. Previously it was always set to Mime::SET, which created dependency on Action Pack. In order to remove this dependency, Mime::SET is used only if ActionController is loaded.
Automatically handling mime types for things other than :rss and :atom is not functionality that justifies dependency on Mime::Type from actionpack.
I've talked to José Valim, who added this comment, and there is no need to remove old API. It's good to have a simple way to instantiate ActionView::Base, by just passing view paths as a first argument, instead of constructing LookupContext and then the Renderer. [ci skip]
We can use another way to instantiate ActionView::Base, by passing renderer as a first option. Thanks to that we can just pass prefixes to LookupContext instead stubbing them on the controller. This is also good, because that kind of API is used in Rails code.
This is another step in moving Action View's dependencies in Action Pack to Action View itself. Also, HtmlScanner seems to be better suited for views rather than controllers.