Skip to content

Commit

Permalink
Update ActionController::UrlFor request contract [ci-skip]
Browse files Browse the repository at this point in the history
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 925bd97.  And
`request.routes` and `request.original_script_name` methods became
required in 87a7591.  And a
`request.engine_script_name` method became required in
4080dd2.

Therefore, this commit updates the documentation to simply require
an `ActionDispatch::Request` instance.
  • Loading branch information
jonathanhefner committed Nov 15, 2022
1 parent 782bed5 commit d69501a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions actionpack/lib/action_controller/metal/url_for.rb
Expand Up @@ -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
Expand Down

0 comments on commit d69501a

Please sign in to comment.