Skip to content

Commit e5524d5

Browse files
committed
minor edits after going through what's new in docrails
1 parent 47003f8 commit e5524d5

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

actionpack/lib/abstract_controller/url_for.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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.
77
module AbstractController
88
module UrlFor
99
extend ActiveSupport::Concern

actionpack/lib/action_controller/metal/url_for.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
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+
# =>
1922
module ActionController
2023
module UrlFor
2124
extend ActiveSupport::Concern

actionpack/lib/action_dispatch/routing/mapper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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'

0 commit comments

Comments
 (0)