public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/edwin/rails.git
Improve documentation coverage and markup
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
fxn (author)
Fri May 02 06:45:23 -0700 2008
lifo (committer)
Fri May 02 06:45:23 -0700 2008
commit  64092de25727c1943807bf5345107d90428135a0
tree    87977e3b0c839fb6adb417949676bb5384155526
parent  87ec72bd8c4b5d178ba7a41e605bc9a8e27f9e67
...
198
199
200
201
 
202
203
204
205
206
 
207
208
209
210
211
212
213
 
214
215
 
216
217
218
219
220
 
221
222
223
224
225
 
226
227
228
...
198
199
200
 
201
202
203
204
205
 
206
207
208
209
210
211
212
 
213
214
 
215
216
217
218
219
 
220
221
222
223
224
 
225
226
227
228
0
@@ -198,31 +198,31 @@ module ActionMailer #:nodoc:
0
   #
0
   # These options are specified on the class level, like <tt>ActionMailer::Base.template_root = "/my/templates"</tt>
0
   #
0
- # * <tt>template_root</tt> - template root determines the base from which template references will be made.
0
+ # * <tt>template_root</tt> - Determines the base from which template references will be made.
0
   #
0
   # * <tt>logger</tt> - the logger is used for generating information on the mailing run if available.
0
   # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
0
   #
0
- # * <tt>smtp_settings</tt> - Allows detailed configuration for :smtp delivery method:
0
+ # * <tt>smtp_settings</tt> - Allows detailed configuration for <tt>:smtp</tt> delivery method:
0
   # * <tt>:address</tt> Allows you to use a remote mail server. Just change it from its default "localhost" setting.
0
   # * <tt>:port</tt> On the off chance that your mail server doesn't run on port 25, you can change it.
0
   # * <tt>:domain</tt> If you need to specify a HELO domain, you can do it here.
0
   # * <tt>:user_name</tt> If your mail server requires authentication, set the username in this setting.
0
   # * <tt>:password</tt> If your mail server requires authentication, set the password in this setting.
0
   # * <tt>:authentication</tt> If your mail server requires authentication, you need to specify the authentication type here.
0
- # This is a symbol and one of :plain, :login, :cram_md5
0
+ # This is a symbol and one of <tt>:plain</tt>, <tt>:login</tt>, <tt>:cram_md5</tt>
0
   #
0
- # * <tt>sendmail_settings</tt> - Allows you to override options for the :sendmail delivery method
0
+ # * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method
0
   # * <tt>:location</tt> The location of the sendmail executable, defaults to "/usr/sbin/sendmail"
0
   # * <tt>:arguments</tt> The command line arguments
0
   # * <tt>raise_delivery_errors</tt> - whether or not errors should be raised if the email fails to be delivered.
0
   #
0
- # * <tt>delivery_method</tt> - Defines a delivery method. Possible values are :smtp (default), :sendmail, and :test.
0
+ # * <tt>delivery_method</tt> - Defines a delivery method. Possible values are <tt>:smtp</tt> (default), <tt>:sendmail</tt>, and <tt>:test</tt>.
0
   #
0
   # * <tt>perform_deliveries</tt> - Determines whether deliver_* methods are actually carried out. By default they are,
0
   # but this can be turned off to help functional testing.
0
   #
0
- # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with delivery_method :test. Most useful
0
+ # * <tt>deliveries</tt> - Keeps an array of all the emails sent out through the Action Mailer with <tt>delivery_method :test</tt>. Most useful
0
   # for unit and functional testing.
0
   #
0
   # * <tt>default_charset</tt> - The default charset used for the body and to encode the subject. Defaults to UTF-8. You can also
...
332
333
334
335
 
 
336
337
338
...
544
545
546
547
548
 
 
549
550
551
...
598
599
600
601
 
602
603
604
...
769
770
771
772
 
773
774
775
...
823
824
825
826
 
827
828
829
...
332
333
334
 
335
336
337
338
339
...
545
546
547
 
 
548
549
550
551
552
...
599
600
601
 
602
603
604
605
...
770
771
772
 
773
774
775
776
...
824
825
826
 
827
828
829
830
0
@@ -332,7 +332,8 @@ module ActionController #:nodoc:
0
     @@resources_path_names = { :new => 'new', :edit => 'edit' }
0
     cattr_accessor :resources_path_names
0
 
0
- # Sets the token parameter name for RequestForgery. Calling #protect_from_forgery sets it to :authenticity_token by default
0
+ # Sets the token parameter name for RequestForgery. Calling +protect_from_forgery+
0
+ # sets it to <tt>:authenticity_token</tt> by default.
0
     cattr_accessor :request_forgery_protection_token
0
 
0
     # Indicates whether or not optimise the generated named
0
@@ -544,8 +545,8 @@ module ActionController #:nodoc:
0
       # * <tt>:host</tt> -- overrides the default (current) host if provided.
0
       # * <tt>:protocol</tt> -- overrides the default (current) protocol if provided.
0
       # * <tt>:port</tt> -- optionally specify the port to connect to.
0
- # * <tt>:user</tt> -- Inline HTTP authentication (only plucked out if :password is also present).
0
- # * <tt>:password</tt> -- Inline HTTP authentication (only plucked out if :user is also present).
0
+ # * <tt>:user</tt> -- Inline HTTP authentication (only plucked out if <tt>:password</tt> is also present).
0
+ # * <tt>:password</tt> -- Inline HTTP authentication (only plucked out if <tt>:user</tt> is also present).
0
       # * <tt>:skip_relative_url_root</tt> -- if true, the url is not constructed using the relative_url_root of the request so the path
0
       # will include the web server relative installation directory.
0
       #
0
@@ -598,7 +599,7 @@ module ActionController #:nodoc:
0
       # url_for :controller => 'posts', :action => nil
0
       #
0
       # If you explicitly want to create a URL that's almost the same as the current URL, you can do so using the
0
- # :overwrite_params options. Say for your posts you have different views for showing and printing them.
0
+ # <tt>:overwrite_params</tt> options. Say for your posts you have different views for showing and printing them.
0
       # Then, in the show view, you get the URL for the print view like this
0
       #
0
       # url_for :overwrite_params => { :action => 'print' }
0
@@ -769,7 +770,7 @@ module ActionController #:nodoc:
0
       # # placed in "app/views/layouts/special.r(html|xml)"
0
       # render :text => "Hi there!", :layout => "special"
0
       #
0
- # The :text option can also accept a Proc object, which can be used to manually control the page generation. This should
0
+ # The <tt>:text</tt> option can also accept a Proc object, which can be used to manually control the page generation. This should
0
       # generally be avoided, as it violates the separation between code and content, and because almost everything that can be
0
       # done with this method can also be done more cleanly using one of the other rendering methods, most notably templates.
0
       #
0
@@ -823,7 +824,7 @@ module ActionController #:nodoc:
0
       #
0
       # === Rendering with status and location headers
0
       #
0
- # All renders take the :status and :location options and turn them into headers. They can even be used together:
0
+ # All renders take the <tt>:status</tt> and <tt>:location</tt> options and turn them into headers. They can even be used together:
0
       #
0
       # render :xml => post.to_xml, :status => :created, :location => post_url(post)
0
       def render(options = nil, extra_options = {}, &block) #:doc:
...
1
2
3
4
 
5
6
 
 
 
 
 
 
 
 
 
 
7
8
9
10
11
12
13
 
14
15
16
17
18
19
 
20
21
22
23
24
25
26
27
28
 
 
 
 
 
 
 
 
 
29
30
31
...
45
46
47
48
49
 
50
51
52
...
54
55
56
 
 
57
58
59
...
66
67
68
69
70
 
 
71
72
73
74
75
76
 
 
 
 
77
78
79
...
1
 
 
 
2
3
 
4
5
6
7
8
9
10
11
12
13
14
 
15
16
17
18
 
19
20
21
22
23
24
 
25
26
 
 
 
 
 
 
 
 
27
28
29
30
31
32
33
34
35
36
37
38
...
52
53
54
 
 
55
56
57
58
...
60
61
62
63
64
65
66
67
...
74
75
76
 
 
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
0
@@ -1,31 +1,38 @@
0
 module ActionController #:nodoc:
0
- # Cookies are read and written through ActionController#cookies. The cookies being read are what were received along with the request,
0
- # the cookies being written are what will be sent out with the response. Cookies are read by value (so you won't get the cookie object
0
- # itself back -- just the value it holds). Examples for writing:
0
+ # Cookies are read and written through ActionController#cookies.
0
   #
0
- # cookies[:user_name] = "david" # => Will set a simple session cookie
0
+ # The cookies being read are the ones received along with the request, the cookies
0
+ # being written will be sent out with the response. Reading a cookie does not get
0
+ # the cookie object itself back, just the value it holds.
0
+ #
0
+ # Examples for writing:
0
+ #
0
+ # # Sets a simple session cookie.
0
+ # cookies[:user_name] = "david"
0
+ #
0
+ # # Sets a cookie that expires in 1 hour.
0
   # cookies[:login] = { :value => "XJ-122", :expires => 1.hour.from_now }
0
- # # => Will set a cookie that expires in 1 hour
0
   #
0
   # Examples for reading:
0
   #
0
   # cookies[:user_name] # => "david"
0
- # cookies.size # => 2
0
+ # cookies.size # => 2
0
   #
0
   # Example for deleting:
0
   #
0
   # cookies.delete :user_name
0
   #
0
- # All the option symbols for setting cookies are:
0
+ # The option symbols for setting cookies are:
0
   #
0
- # * <tt>value</tt> - the cookie's value or list of values (as an array).
0
- # * <tt>path</tt> - the path for which this cookie applies. Defaults to the root of the application.
0
- # * <tt>domain</tt> - the domain for which this cookie applies.
0
- # * <tt>expires</tt> - the time at which this cookie expires, as a +Time+ object.
0
- # * <tt>secure</tt> - whether this cookie is a secure cookie or not (default to false).
0
- # Secure cookies are only transmitted to HTTPS servers.
0
- # * <tt>http_only</tt> - whether this cookie is accessible via scripting or only HTTP (defaults to false).
0
-
0
+ # * <tt>:value</tt> - The cookie's value or list of values (as an array).
0
+ # * <tt>:path</tt> - The path for which this cookie applies. Defaults to the root
0
+ # of the application.
0
+ # * <tt>:domain</tt> - The domain for which this cookie applies.
0
+ # * <tt>:expires</tt> - The time at which this cookie expires, as a Time object.
0
+ # * <tt>:secure</tt> - Whether this cookie is a only transmitted to HTTPS servers.
0
+ # Default is +false+.
0
+ # * <tt>:http_only</tt> - Whether this cookie is accessible via scripting or
0
+ # only HTTP. Defaults to +false+.
0
   module Cookies
0
     def self.included(base)
0
       base.helper_method :cookies
0
@@ -45,8 +52,7 @@ module ActionController #:nodoc:
0
       update(@cookies)
0
     end
0
 
0
- # Returns the value of the cookie by +name+ -- or nil if no such cookie exists. You set new cookies using cookies[]=
0
- # (for simple name/value cookies without options).
0
+ # Returns the value of the cookie by +name+, or +nil+ if no such cookie exists.
0
     def [](name)
0
       cookie = @cookies[name.to_s]
0
       if cookie && cookie.respond_to?(:value)
0
@@ -54,6 +60,8 @@ module ActionController #:nodoc:
0
       end
0
     end
0
 
0
+ # Sets the cookie named +name+. The second argument may be the very cookie
0
+ # value, or a hash of options as documented above.
0
     def []=(name, options)
0
       if options.is_a?(Hash)
0
         options = options.inject({}) { |options, pair| options[pair.first.to_s] = pair.last; options }
0
@@ -66,14 +74,18 @@ module ActionController #:nodoc:
0
     end
0
 
0
     # Removes the cookie on the client machine by setting the value to an empty string
0
- # and setting its expiration date into the past. Like []=, you can pass in an options
0
- # hash to delete cookies with extra data such as a +path+.
0
+ # and setting its expiration date into the past. Like <tt>[]=</tt>, you can pass in
0
+ # an options hash to delete cookies with extra data such as a <tt>:path</tt>.
0
     def delete(name, options = {})
0
       options.stringify_keys!
0
       set_cookie(options.merge("name" => name.to_s, "value" => "", "expires" => Time.at(0)))
0
     end
0
 
0
     private
0
+ # Builds a CGI::Cookie object and adds the cookie to the response headers.
0
+ #
0
+ # The path of the cookie defaults to "/" if there's none in +options+, and
0
+ # everything is passed to the CGI::Cookie constructor.
0
       def set_cookie(options) #:doc:
0
         options["path"] = "/" unless options["path"]
0
         cookie = CGI::Cookie.new(options)
...
126
127
128
129
130
 
 
131
132
133
...
191
192
193
194
195
 
 
 
196
197
198
...
126
127
128
 
 
129
130
131
132
133
...
191
192
193
 
 
194
195
196
197
198
199
0
@@ -126,8 +126,8 @@ module ActionController #:nodoc:
0
     # end
0
     #
0
     # To use a filter object with around_filter, pass an object responding
0
- # to :filter or both :before and :after. With a filter method, yield to
0
- # the block as above:
0
+ # to <tt>:filter</tt> or both <tt>:before</tt> and <tt>:after</tt>. With a
0
+ # filter method, yield to the block as above:
0
     #
0
     # around_filter BenchmarkingFilter
0
     #
0
@@ -191,8 +191,9 @@ module ActionController #:nodoc:
0
     # == Filter conditions
0
     #
0
     # Filters may be limited to specific actions by declaring the actions to
0
- # include or exclude. Both options accept single actions (:only => :index)
0
- # or arrays of actions (:except => [:foo, :bar]).
0
+ # include or exclude. Both options accept single actions
0
+ # (<tt>:only => :index</tt>) or arrays of actions
0
+ # (<tt>:except => [:foo, :bar]</tt>).
0
     #
0
     # class Journal < ActionController::Base
0
     # # Require authentication for edit and delete.
...
143
144
145
146
 
 
147
148
 
149
 
 
 
 
150
 
 
 
151
152
153
...
143
144
145
 
146
147
148
 
149
150
151
152
153
154
155
156
157
158
159
160
161
0
@@ -143,11 +143,19 @@ module ActionController #:nodoc:
0
       # Declare a controller method as a helper. For example, the following
0
       # makes the +current_user+ controller method available to the view:
0
       # class ApplicationController < ActionController::Base
0
- # helper_method :current_user
0
+ # helper_method :current_user, :logged_in?
0
+ #
0
       # def current_user
0
- # @current_user ||= User.find(session[:user])
0
+ # @current_user ||= User.find_by_id(session[:user])
0
       # end
0
+ #
0
+ # def logged_in?
0
+ # current_user != nil
0
+ # end
0
       # end
0
+ #
0
+ # In a view:
0
+ # <% if logged_in? -%>Welcome, <%= current_user.name %><% end -%>
0
       def helper_method(*methods)
0
         methods.flatten.each do |method|
0
           master_helper_module.module_eval <<-end_eval
...
19
20
21
22
 
23
24
25
...
19
20
21
 
22
23
24
25
0
@@ -19,7 +19,7 @@ module ActionController
0
   # * <tt>url_for</tt>, so you can use it with a record as the argument, e.g.
0
   # <tt>url_for(@article)</tt>;
0
   # * ActionView::Helpers::FormHelper uses <tt>polymorphic_path</tt>, so you can write
0
- # <tt>form_for(@article)</tt> without having to specify :url parameter for the form
0
+ # <tt>form_for(@article)</tt> without having to specify <tt>:url</tt> parameter for the form
0
   # action;
0
   # * <tt>redirect_to</tt> (which, in fact, uses <tt>url_for</tt>) so you can write
0
   # <tt>redirect_to(post)</tt> in your controllers;
...
15
16
17
18
 
19
20
21
...
28
29
30
31
32
 
 
33
34
35
36
37
38
 
39
40
41
42
43
 
44
45
46
47
48
 
49
50
51
52
53
 
54
55
56
57
58
59
 
 
60
61
62
...
15
16
17
 
18
19
20
21
...
28
29
30
 
 
31
32
33
34
35
36
37
 
38
39
40
41
42
 
43
44
45
46
47
 
48
49
50
51
52
 
53
54
55
56
57
 
 
58
59
60
61
62
0
@@ -15,7 +15,7 @@ module ActionController
0
     # such as { 'RAILS_ENV' => 'production' }.
0
     attr_reader :env
0
 
0
- # The true HTTP request method as a lowercase symbol, such as :get.
0
+ # The true HTTP request method as a lowercase symbol, such as <tt>:get</tt>.
0
     # UnknownHttpMethod is raised for invalid methods not listed in ACCEPTED_HTTP_METHODS.
0
     def request_method
0
       @request_method ||= begin
0
@@ -28,35 +28,35 @@ module ActionController
0
       end
0
     end
0
 
0
- # The HTTP request method as a lowercase symbol, such as :get.
0
- # Note, HEAD is returned as :get since the two are functionally
0
+ # The HTTP request method as a lowercase symbol, such as <tt>:get</tt>.
0
+ # Note, HEAD is returned as <tt>:get</tt> since the two are functionally
0
     # equivalent from the application's perspective.
0
     def method
0
       request_method == :head ? :get : request_method
0
     end
0
 
0
- # Is this a GET (or HEAD) request? Equivalent to request.method == :get
0
+ # Is this a GET (or HEAD) request? Equivalent to <tt>request.method == :get</tt>.
0
     def get?
0
       method == :get
0
     end
0
 
0
- # Is this a POST request? Equivalent to request.method == :post
0
+ # Is this a POST request? Equivalent to <tt>request.method == :post</tt>.
0
     def post?
0
       request_method == :post
0
     end
0
 
0
- # Is this a PUT request? Equivalent to request.method == :put
0
+ # Is this a PUT request? Equivalent to <tt>request.method == :put</tt>.
0
     def put?
0
       request_method == :put
0
     end
0
 
0
- # Is this a DELETE request? Equivalent to request.method == :delete
0
+ # Is this a DELETE request? Equivalent to <tt>request.method == :delete</tt>.
0
     def delete?
0
       request_method == :delete
0
     end
0
 
0
- # Is this a HEAD request? request.method sees HEAD as :get, so check the
0
- # HTTP method directly.
0
+ # Is this a HEAD request? <tt>request.method</tt> sees HEAD as <tt>:get</tt>,
0
+ # so check the HTTP method directly.
0
     def head?
0
       request_method == :head
0
     end
...
102
103
104
105
 
 
106
107
108
...
102
103
104
 
105
106
107
108
109
0
@@ -102,7 +102,8 @@ module ActionController #:nodoc:
0
         request.format.html? || request.format.js?
0
       end
0
     
0
- # Sets the token value for the current session. Pass a :secret option in #protect_from_forgery to add a custom salt to the hash.
0
+ # Sets the token value for the current session. Pass a <tt>:secret</tt> option
0
+ # in +protect_from_forgery+ to add a custom salt to the hash.
0
       def form_authenticity_token
0
         @form_authenticity_token ||= if request_forgery_protection_options[:secret]
0
           authenticity_token_from_session_id
...
58
59
60
61
62
 
 
 
63
64
65
66
67
68
69
 
 
70
71
72
73
 
 
 
74
75
76
77
78
79
80
81
 
 
82
83
84
85
86
87
 
 
 
 
 
 
 
 
 
88
89
90
...
58
59
60
 
 
61
62
63
64
65
66
67
68
69
 
70
71
72
 
 
 
73
74
75
76
 
 
 
 
 
 
 
77
78
79
80
 
 
 
 
81
82
83
84
85
86
87
88
89
90
91
92
0
@@ -58,33 +58,35 @@ module ActionController #:nodoc:
0
       # Rescue exceptions raised in controller actions.
0
       #
0
       # <tt>rescue_from</tt> receives a series of exception classes or class
0
- # names, and a trailing :with option with the name of a method or a Proc
0
- # object to be called to handle them. Alternatively a block can be given.
0
+ # names, and a trailing <tt>:with</tt> option with the name of a method
0
+ # or a Proc object to be called to handle them. Alternatively a block can
0
+ # be given.
0
       #
0
       # Handlers that take one argument will be called with the exception, so
0
       # that the exception can be inspected when dealing with it.
0
       #
0
       # Handlers are inherited. They are searched from right to left, from
0
       # bottom to top, and up the hierarchy. The handler of the first class for
0
- # which exception.is_a?(klass) holds true is the one invoked, if any.
0
+ # which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if
0
+ # any.
0
       #
0
- # class ApplicationController < ActionController::Base
0
- # rescue_from User::NotAuthorized, :with => :deny_access # self defined exception
0
- # rescue_from ActiveRecord::RecordInvalid, :with => :show_errors
0
+ # class ApplicationController < ActionController::Base
0
+ # rescue_from User::NotAuthorized, :with => :deny_access # self defined exception
0
+ # rescue_from ActiveRecord::RecordInvalid, :with => :show_errors
0
       #
0
- # rescue_from 'MyAppError::Base' do |exception|
0
- # render :xml => exception, :status => 500
0
- # end
0
- #
0
- # protected
0
- # def deny_access
0
- # ...
0
+ # rescue_from 'MyAppError::Base' do |exception|
0
+ # render :xml => exception, :status => 500
0
       # end
0
       #
0
- # def show_errors(exception)
0
- # exception.record.new_record? ? ...
0
- # end
0
- # end
0
+ # protected
0
+ # def deny_access
0
+ # ...
0
+ # end
0
+ #
0
+ # def show_errors(exception)
0
+ # exception.record.new_record? ? ...
0
+ # end
0
+ # end
0
       def rescue_from(*klasses, &block)
0
         options = klasses.extract_options!
0
         unless options.has_key?(:with)
...
240
241
242
243
244
 
 
245
246
247
248
 
249
250
251
...
254
255
256
257
 
258
259
260
...
288
289
290
291
 
292
293
294
...
302
303
304
305
 
306
307
308
...
364
365
366
367
 
368
369
370
...
240
241
242
 
 
243
244
245
246
247
 
248
249
250
251
...
254
255
256
 
257
258
259
260
...
288
289
290
 
291
292
293
294
...
302
303
304
 
305
306
307
308
...
364
365
366
 
367
368
369
370
0
@@ -240,12 +240,12 @@ module ActionController
0
     # * <tt>:collection</tt> - add named routes for other actions that operate on the collection.
0
     # Takes a hash of <tt>#{action} => #{method}</tt>, where method is <tt>:get</tt>/<tt>:post</tt>/<tt>:put</tt>/<tt>:delete</tt>
0
     # or <tt>:any</tt> if the method does not matter. These routes map to a URL like /messages/rss, with a route of rss_messages_url.
0
- # * <tt>:member</tt> - same as :collection, but for actions that operate on a specific member.
0
- # * <tt>:new</tt> - same as :collection, but for actions that operate on the new resource action.
0
+ # * <tt>:member</tt> - same as <tt>:collection</tt>, but for actions that operate on a specific member.
0
+ # * <tt>:new</tt> - same as <tt>:collection</tt>, but for actions that operate on the new resource action.
0
     # * <tt>:controller</tt> - specify the controller name for the routes.
0
     # * <tt>:singular</tt> - specify the singular name used in the member routes.
0
     # * <tt>:requirements</tt> - set custom routing parameter requirements.
0
- # * <tt>:conditions</tt> - specify custom routing recognition conditions. Resources sets the :method value for the method-specific routes.
0
+ # * <tt>:conditions</tt> - specify custom routing recognition conditions. Resources sets the <tt>:method</tt> value for the method-specific routes.
0
     # * <tt>:as</tt> - specify a different resource name to use in the URL path. For example:
0
     # # products_path == '/productos'
0
     # map.resources :products, :as => 'productos' do |product|
0
@@ -254,7 +254,7 @@ module ActionController
0
     # end
0
     #
0
     # * <tt>:has_one</tt> - specify nested resources, this is a shorthand for mapping singleton resources beneath the current.
0
- # * <tt>:has_many</tt> - same has :has_one, but for plural resources.
0
+ # * <tt>:has_many</tt> - same has <tt>:has_one</tt>, but for plural resources.
0
     #
0
     # You may directly specify the routing association with has_one and has_many like:
0
     #
0
@@ -288,7 +288,7 @@ module ActionController
0
     # article.resources :comments
0
     # end
0
     #
0
- # The comment resources work the same, but must now include a value for :article_id.
0
+ # The comment resources work the same, but must now include a value for <tt>:article_id</tt>.
0
     #
0
     # article_comments_url(@article)
0
     # article_comment_url(@article, @comment)
0
@@ -302,7 +302,7 @@ module ActionController
0
     # map.resources :tags, :path_prefix => '/books/:book_id', :name_prefix => 'book_'
0
     # map.resources :tags, :path_prefix => '/toys/:toy_id', :name_prefix => 'toy_'
0
     #
0
- # You may also use :name_prefix to override the generic named routes in a nested resource:
0
+ # You may also use <tt>:name_prefix</tt> to override the generic named routes in a nested resource:
0
     #
0
     # map.resources :articles do |article|
0
     # article.resources :comments, :name_prefix => nil
0
@@ -364,7 +364,7 @@ module ActionController
0
     #
0
     # See map.resources for general conventions. These are the main differences:
0
     # * A singular name is given to map.resource. The default controller name is still taken from the plural name.
0
- # * To specify a custom plural name, use the :plural option. There is no :singular option.
0
+ # * To specify a custom plural name, use the <tt>:plural</tt> option. There is no <tt>:singular</tt> option.
0
     # * No default index route is created for the singleton resource controller.
0
     # * When nesting singleton resources, only the singular name is used as the path prefix (example: 'account/messages/1')
0
     #