@@ -9,7 +9,7 @@ module Routing
9
9
# See ActionDispatch::Routing for general information about routing and <tt>config/routes.rb</tt>.
10
10
#
11
11
# <b>Tip:</b> If you need to generate URLs from your models or some other place,
12
- # then ActionController ::UrlFor is what you're looking for. Read on for
12
+ # then ActionDispatch::Routing ::UrlFor is what you're looking for. Read on for
13
13
# an introduction. In general, this module should not be included on its own,
14
14
# as it is usually included by +url_helpers+ (as in <tt>Rails.application.routes.url_helpers</tt>).
15
15
#
@@ -25,11 +25,11 @@ module Routing
25
25
# # => <a href="/users/new?message=Welcome%21">Click here</a>
26
26
#
27
27
# +link_to+, and all other functions that require URL generation functionality,
28
- # actually use ActionController ::UrlFor under the hood. And in particular,
29
- # they use the ActionController ::UrlFor#url_for method. One can generate
28
+ # actually use ActionDispatch::Routing ::UrlFor under the hood. And in particular,
29
+ # they use the ActionDispatch::Routing ::UrlFor#url_for method. One can generate
30
30
# the same path as the above example by using the following code:
31
31
#
32
- # include UrlFor
32
+ # include ActionDispatch::Routing:: UrlFor
33
33
# url_for(controller: 'users',
34
34
# action: 'new',
35
35
# message: 'Welcome!',
@@ -53,12 +53,12 @@ module Routing
53
53
# controllers or your views, then you don't need to explicitly pass the <tt>:host</tt>
54
54
# argument.
55
55
#
56
- # For convenience reasons , mailers provide a shortcut for ActionController:: UrlFor#url_for.
57
- # So within mailers, you only have to type + url_for+ instead of 'ActionController::UrlFor#url_for'
58
- # in full. However, mailers don't have hostname information, and you still have to provide
59
- # the +:host+ argument or set the default host that will be used in all mailers using the
60
- # configuration option +config.action_mailer. default_url_options+. For more information on
61
- # url_for in mailers read the ActionMailer::Base documentation.
56
+ # For convenience, mailers also include ActionDispatch::Routing:: UrlFor. So
57
+ # within mailers, you can use url_for. However, mailers cannot access
58
+ # incoming web requests in order to derive hostname information, so you have
59
+ # to provide the +:host+ option or set the default host using
60
+ # + default_url_options+. For more information on url_for in mailers see the
61
+ # ActionMailer::Base documentation.
62
62
#
63
63
#
64
64
# == URL generation for named routes
0 commit comments