Skip to content

Commit d69501a

Browse files
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 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.
1 parent 782bed5 commit d69501a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

actionpack/lib/action_controller/metal/url_for.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ module ActionController
66
#
77
# In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define
88
# URL options like the +host+. In order to do so, this module requires the host class
9-
# to implement +env+ which needs to be Rack-compatible and +request+
10-
# which is either an instance of ActionDispatch::Request or an object
11-
# that responds to the +host+, +optional_port+, +protocol+, and
12-
# +symbolized_path_parameter+ methods.
9+
# to implement +env+ which needs to be Rack-compatible, and +request+ which
10+
# returns an ActionDispatch::Request instance.
1311
#
1412
# class RootUrl
1513
# include ActionController::UrlFor

0 commit comments

Comments
 (0)