I also removed the other require as it's already present in `activesupport/core_ext/time/calculations`
In case `source_roout` is not set, `default_source_root` is used, which includes also `templates` directory. If there is no `templates` directory, `default_source_root` is not available and USAGE will not be displayed. USAGE should be also checked based on default directory excluding `templates`.
If embedding auth_token in remote forms is off and we pass a value for auth_token it should respect it.
Previously `rendered_format` was set only based on mime types passed in Accept header, which was wrong if first type from Accept was different than rendered partial. The fix is to simply move setting rendered_format to the place where template is available and grab format from the template. If it fails we can fallback to formats passed by Accept header.
When someone accidentally passes a string to sanitize like: sanitize("<span>foo</span>", :tags => "b") there is no indication that it's the wrong way and span will not be removed.
Before it was handled by Proc.bind, but since Proc.bind has been deprecated, this is no longer the case and returned handler needs to match rescuer.
This method has no effect since exception handling was moved to middlewares and ActionController tests do not use any middlewares.
… migrations [skip ci]