File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1- # Includes # url_for into the host class (e.g. an abstract controller or mailer). The class
2- # has to provide a RouteSet by implementing the # _routes methods. Otherwise, an exception
3- # will be raised.
1+ # Includes + url_for+ into the host class (e.g. an abstract controller or mailer). The class
2+ # has to provide a + RouteSet+ by implementing the <tt> _routes</tt> methods. Otherwise, an
3+ # exception will be raised.
44#
55# Note that this module is completely decoupled from HTTP - the only requirement is a valid
6- # # _routes implementation.
6+ # <tt> _routes</tt> implementation.
77module AbstractController
88 module UrlFor
99 extend ActiveSupport ::Concern
Original file line number Diff line number Diff line change 1- # Includes # url_for into the host class. The class has to provide a RouteSet by implementing
2- # the # _routes methods . Otherwise, an exception will be raised.
1+ # Includes + url_for+ into the host class. The class has to provide a + RouteSet+ by implementing
2+ # the <tt> _routes</tt> method . Otherwise, an exception will be raised.
33#
4- # In addition to AbstractController::UrlFor, this module accesses the HTTP layer to define
4+ # In addition to <tt> AbstractController::UrlFor</tt> , this module accesses the HTTP layer to define
55# url options like the +host+. In order to do so, this module requires the host class
6- # to implement # env and # request, which need to be a Rack-compatible.
6+ # to implement + env+ and + request+ , which need to be a Rack-compatible.
77#
88# Example:
99#
1010# class RootUrl
1111# include ActionController::UrlFor
1212# include Rails.application.routes.url_helpers
13+ #
1314# delegate :env, :request, :to => :controller
1415#
1516# def initialize(controller)
1617# @controller = controller
1718# @url = root_path # named route from the application.
1819# end
20+ # end
21+ # =>
1922module ActionController
2023 module UrlFor
2124 extend ActiveSupport ::Concern
Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ def root(options = {})
352352 #
353353 # [:constraints]
354354 # Constrains parameters with a hash of regular expressions or an
355- # object that responds to <tt># matches?</tt>
355+ # object that responds to <tt>matches?</tt>
356356 #
357357 # match 'path/:id', :constraints => { :id => /[A-Z]\d{5}/ }
358358 #
@@ -373,7 +373,7 @@ def root(options = {})
373373 # See <tt>Scoping#defaults</tt> for its scope equivalent.
374374 #
375375 # [:anchor]
376- # Boolean to anchor a <tt># match</tt> pattern. Default is true. When set to
376+ # Boolean to anchor a <tt>match</tt> pattern. Default is true. When set to
377377 # false, the pattern matches any request prefixed with the given path.
378378 #
379379 # # Matches any request starting with 'path'
You can’t perform that action at this time.
0 commit comments