Skip to content

Commit f2ca082

Browse files
committed
[ci skip] Fix some more documentation links
1 parent 754c0f8 commit f2ca082

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

actionpack/lib/action_controller/metal/redirecting.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ class UnsafeRedirectError < StandardError; end
6666
# === Open Redirect protection
6767
#
6868
# By default, Rails protects against redirecting to external hosts for your app's safety, so called open redirects.
69-
# Note: this was a new default in Rails 7.0, after upgrading opt-in by uncommenting the line with #raise_on_open_redirects in <tt>config/initializers/new_framework_defaults_7_0.rb</tt>
69+
# Note: this was a new default in Rails 7.0, after upgrading opt-in by uncommenting the line with +raise_on_open_redirects+ in <tt>config/initializers/new_framework_defaults_7_0.rb</tt>
7070
#
7171
# Here #redirect_to automatically validates the potentially-unsafe URL:
7272
#
7373
# redirect_to params[:redirect_url]
7474
#
75-
# Raises #UnsafeRedirectError in the case of an unsafe redirect.
75+
# Raises UnsafeRedirectError in the case of an unsafe redirect.
7676
#
7777
# To allow any external redirects pass `allow_other_host: true`, though using a user-provided param in that case is unsafe.
7878
#
@@ -90,7 +90,7 @@ def redirect_to(options = {}, response_options = {})
9090
self.response_body = "<html><body>You are being <a href=\"#{ERB::Util.unwrapped_html_escape(response.location)}\">redirected</a>.</body></html>"
9191
end
9292

93-
# Soft deprecated alias for <tt>redirect_back_or_to</tt> where the fallback_location location is supplied as a keyword argument instead
93+
# Soft deprecated alias for #redirect_back_or_to where the +fallback_location+ location is supplied as a keyword argument instead
9494
# of the first positional argument.
9595
def redirect_back(fallback_location:, allow_other_host: _allow_other_host, **args)
9696
redirect_back_or_to fallback_location, allow_other_host: allow_other_host, **args
@@ -164,7 +164,7 @@ def _compute_redirect_to_location(request, options) # :nodoc:
164164
# # If request.host is on https://example.com or https://app.example.com, you'd get:
165165
# url_from("https://dev.example.com/profile") # => nil
166166
#
167-
# NOTE: there's a similarity with #url_for, which generates an internal URL from various options from within the app, e.g. <tt>url_for(@post)</tt>.
167+
# NOTE: there's a similarity with ActionDispatch::Routing::UrlFor#url_for, which generates an internal URL from various options from within the app, e.g. <tt>url_for(@post)</tt>.
168168
# However, #url_from is meant to take an external parameter to verify as in <tt>url_from(params[:redirect_url])</tt>.
169169
def url_from(location)
170170
location = location.presence

0 commit comments

Comments
 (0)