Update ActionController::UrlFor request contract [ci-skip]

Using a `request` object that only "responds to the `host`,
`optional_port`, `protocol`, and `symbolized_path_parameter` methods"
has not been possible for a long time.  For example,
`symbolized_path_parameter` was renamed to `path_parameters` (without
deprecation) in 925bd97566.  And
`request.routes` and `request.original_script_name` methods became
required in 87a7591064.  And a
`request.engine_script_name` method became required in
4080dd2f24.

Therefore, this commit updates the documentation to simply require
an `ActionDispatch::Request` instance.
This commit is contained in:
Jonathan Hefner 2022-11-14 11:27:30 -06:00
parent 782bed5d45
commit d69501a3d6
1 changed files with 2 additions and 4 deletions

View File

@ -6,10 +6,8 @@ module ActionController
#
# In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define
# URL options like the +host+. In order to do so, this module requires the host class
# to implement +env+ which needs to be Rack-compatible and +request+
# which is either an instance of ActionDispatch::Request or an object
# that responds to the +host+, +optional_port+, +protocol+, and
# +symbolized_path_parameter+ methods.
# to implement +env+ which needs to be Rack-compatible, and +request+ which
# returns an ActionDispatch::Request instance.
#
# class RootUrl
# include ActionController::UrlFor