Skip to content
This repository
Browse code

Standardize on using hyphens rather than colons to separate option na…

…mes from their explanation in documentation. Replace + with tt tags. Closes #8732. [ryanb]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8106 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 94502623fb8354ba0c88b9d1bc94bf940e0d5018 1 parent 19d4c21
authored November 06, 2007
8  actionpack/lib/action_controller/assertions/response_assertions.rb
@@ -6,10 +6,10 @@ module Assertions
6 6
     module ResponseAssertions
7 7
       # Asserts that the response is one of the following types:
8 8
       #
9  
-      # * <tt>:success</tt>: Status code was 200
10  
-      # * <tt>:redirect</tt>: Status code was in the 300-399 range
11  
-      # * <tt>:missing</tt>: Status code was 404
12  
-      # * <tt>:error</tt>:  Status code was in the 500-599 range
  9
+      # * <tt>:success</tt>   - Status code was 200
  10
+      # * <tt>:redirect</tt>  - Status code was in the 300-399 range
  11
+      # * <tt>:missing</tt>   - Status code was 404
  12
+      # * <tt>:error</tt>     - Status code was in the 500-599 range
13 13
       #
14 14
       # You can also pass an explicit status number like assert_response(501)
15 15
       # or its symbolic equivalent assert_response(:not_implemented).
12  actionpack/lib/action_controller/assertions/selector_assertions.rb
@@ -326,14 +326,16 @@ def count_description(min, max) #:nodoc:
326 326
       # that update or insert an element with that identifier.
327 327
       #
328 328
       # Use the first argument to narrow down assertions to only statements
329  
-      # of that type. Possible values are +:replace+, +:replace_html+, +:show+,
330  
-      # +:hide+, +:toggle+, +:remove+ and +:insert_html+.
  329
+      # of that type. Possible values are <tt>:replace</tt>, <tt>:replace_html</tt>, 
  330
+      # <tt>:show</tt>, <tt>:hide</tt>, <tt>:toggle</tt>, <tt>:remove</tt> and
  331
+      # <tt>:insert_html</tt>.
331 332
       #
332  
-      # Use the argument +:insert+ followed by an insertion position to narrow
  333
+      # Use the argument <tt>:insert</tt> followed by an insertion position to narrow
333 334
       # down the assertion to only statements that insert elements in that
334  
-      # position. Possible values are +:top+, +:bottom+, +:before+ and +:after+.
  335
+      # position. Possible values are <tt>:top</tt>, <tt>:bottom</tt>, <tt>:before</tt>
  336
+      # and <tt>:after</tt>.
335 337
       #
336  
-      # Using the +:remove+ statement, you will be able to pass a block, but it will
  338
+      # Using the <tt>:remove</tt> statement, you will be able to pass a block, but it will
337 339
       # be ignored as there is no HTML passed for this statement.
338 340
       #
339 341
       # === Using blocks
10  actionpack/lib/action_controller/base.rb
@@ -982,11 +982,11 @@ def default_url_options(options) #:doc:
982 982
 
983 983
       # Redirects the browser to the target specified in +options+. This parameter can take one of three forms:
984 984
       #
985  
-      # * <tt>Hash</tt>: The URL will be generated by calling url_for with the +options+.
986  
-      # * <tt>Record</tt>: The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record.
987  
-      # * <tt>String starting with protocol:// (like http://)</tt>: Is passed straight through as the target for redirection.
988  
-      # * <tt>String not containing a protocol</tt>: The current protocol and host is prepended to the string.
989  
-      # * <tt>:back</tt>: Back to the page that issued the request. Useful for forms that are triggered from multiple places.
  985
+      # * <tt>Hash</tt> - The URL will be generated by calling url_for with the +options+.
  986
+      # * <tt>Record</tt> - The URL will be generated by calling url_for with the +options+, which will reference a named URL for that record.
  987
+      # * <tt>String starting with protocol:// (like http://)</tt> - Is passed straight through as the target for redirection.
  988
+      # * <tt>String not containing a protocol</tt> - The current protocol and host is prepended to the string.
  989
+      # * <tt>:back</tt> - Back to the page that issued the request. Useful for forms that are triggered from multiple places.
990 990
       #   Short-hand for redirect_to(request.env["HTTP_REFERER"])
991 991
       #
992 992
       # Examples:
22  actionpack/lib/action_controller/verification.rb
@@ -42,32 +42,32 @@ module ClassMethods
42 42
       # the user is redirected to a different action. The +options+ parameter
43 43
       # is a hash consisting of the following key/value pairs:
44 44
       #
45  
-      # * <tt>:params</tt>: a single key or an array of keys that must
  45
+      # * <tt>:params</tt> - a single key or an array of keys that must
46 46
       #   be in the <tt>params</tt> hash in order for the action(s) to be safely
47 47
       #   called.
48  
-      # * <tt>:session</tt>: a single key or an array of keys that must
  48
+      # * <tt>:session</tt> - a single key or an array of keys that must
49 49
       #   be in the <tt>session</tt> in order for the action(s) to be safely called.
50  
-      # * <tt>:flash</tt>: a single key or an array of keys that must
  50
+      # * <tt>:flash</tt> - a single key or an array of keys that must
51 51
       #   be in the flash in order for the action(s) to be safely called.
52  
-      # * <tt>:method</tt>: a single key or an array of keys--any one of which
  52
+      # * <tt>:method</tt> - a single key or an array of keys--any one of which
53 53
       #   must match the current request method in order for the action(s) to
54 54
       #   be safely called. (The key should be a symbol: <tt>:get</tt> or
55 55
       #   <tt>:post</tt>, for example.)
56  
-      # * <tt>:xhr</tt>: true/false option to ensure that the request is coming
  56
+      # * <tt>:xhr</tt> - true/false option to ensure that the request is coming
57 57
       #   from an Ajax call or not. 
58  
-      # * <tt>:add_flash</tt>: a hash of name/value pairs that should be merged
  58
+      # * <tt>:add_flash</tt> - a hash of name/value pairs that should be merged
59 59
       #   into the session's flash if the prerequisites cannot be satisfied.
60  
-      # * <tt>:add_headers</tt>: a hash of name/value pairs that should be
  60
+      # * <tt>:add_headers</tt> - a hash of name/value pairs that should be
61 61
       #   merged into the response's headers hash if the prerequisites cannot
62 62
       #   be satisfied.
63  
-      # * <tt>:redirect_to</tt>: the redirection parameters to be used when
  63
+      # * <tt>:redirect_to</tt> - the redirection parameters to be used when
64 64
       #   redirecting if the prerequisites cannot be satisfied. You can 
65 65
       #   redirect either to named route or to the action in some controller.
66  
-      # * <tt>:render</tt>: the render parameters to be used when
  66
+      # * <tt>:render</tt> - the render parameters to be used when
67 67
       #   the prerequisites cannot be satisfied.
68  
-      # * <tt>:only</tt>: only apply this verification to the actions specified
  68
+      # * <tt>:only</tt> - only apply this verification to the actions specified
69 69
       #   in the associated array (may also be a single value).
70  
-      # * <tt>:except</tt>: do not apply this verification to the actions
  70
+      # * <tt>:except</tt> - do not apply this verification to the actions
71 71
       #   specified in the associated array (may also be a single value).
72 72
       def verify(options={})
73 73
         filter_opts = { :only => options[:only], :except => options[:except] }
2  actionpack/lib/action_view/helpers/record_tag_helper.rb
@@ -38,7 +38,7 @@ def div_for(record, *args, &block)
38 38
       #    <tr id="foo_person_123" class="person">...
39 39
       #
40 40
       # content_tag_for also accepts a hash of options, which will be converted to
41  
-      # additional HTML attributes. If you specify a +:class+ value, it will be combined
  41
+      # additional HTML attributes. If you specify a <tt>:class</tt> value, it will be combined
42 42
       # with the default class name for your object. For example:
43 43
       #
44 44
       #    <% content_tag_for(:li, @person, :class => "bar") %>...
12  activerecord/lib/active_record/calculations.rb
@@ -97,14 +97,14 @@ def sum(column_name, options = {})
97 97
       #       end
98 98
       #
99 99
       # Options:
100  
-      # * <tt>:conditions</tt>: An SQL fragment like "administrator = 1" or [ "user_name = ?", username ]. See conditions in the intro.
101  
-      # * <tt>:joins</tt>: An SQL fragment for additional joins like "LEFT JOIN comments ON comments.post_id = id". (Rarely needed).
  100
+      # * <tt>:conditions</tt> - An SQL fragment like "administrator = 1" or [ "user_name = ?", username ]. See conditions in the intro.
  101
+      # * <tt>:joins</tt> - An SQL fragment for additional joins like "LEFT JOIN comments ON comments.post_id = id". (Rarely needed).
102 102
       #   The records will be returned read-only since they will have attributes that do not correspond to the table's columns.
103  
-      # * <tt>:order</tt>: An SQL fragment like "created_at DESC, name" (really only used with GROUP BY calculations).
104  
-      # * <tt>:group</tt>: An attribute name by which the result should be grouped. Uses the GROUP BY SQL-clause.
105  
-      # * <tt>:select</tt>: By default, this is * as in SELECT * FROM, but can be changed if you for example want to do a join, but not
  103
+      # * <tt>:order</tt> - An SQL fragment like "created_at DESC, name" (really only used with GROUP BY calculations).
  104
+      # * <tt>:group</tt> - An attribute name by which the result should be grouped. Uses the GROUP BY SQL-clause.
  105
+      # * <tt>:select</tt> - By default, this is * as in SELECT * FROM, but can be changed if you for example want to do a join, but not
106 106
       #   include the joined columns.
107  
-      # * <tt>:distinct</tt>: Set this to true to make this a distinct calculation, such as SELECT COUNT(DISTINCT posts.id) ...
  107
+      # * <tt>:distinct</tt> - Set this to true to make this a distinct calculation, such as SELECT COUNT(DISTINCT posts.id) ...
108 108
       #
109 109
       # Examples:
110 110
       #   Person.calculate(:count, :all) # The same as Person.count
10  activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -300,17 +300,17 @@ def [](name)
300 300
       # <tt>:date</tt>, <tt>:binary</tt>, <tt>:boolean</tt>.
301 301
       #
302 302
       # Available options are (none of these exists by default):
303  
-      # * <tt>:limit</tt>:
  303
+      # * <tt>:limit</tt> -
304 304
       #   Requests a maximum column length (<tt>:string</tt>, <tt>:text</tt>,
305 305
       #   <tt>:binary</tt> or <tt>:integer</tt> columns only)
306  
-      # * <tt>:default</tt>:
  306
+      # * <tt>:default</tt> -
307 307
       #   The column's default value. Use nil for NULL.
308  
-      # * <tt>:null</tt>:
  308
+      # * <tt>:null</tt> -
309 309
       #   Allows or disallows +NULL+ values in the column.  This option could
310 310
       #   have been named <tt>:null_allowed</tt>.
311  
-      # * <tt>:precision</tt>:
  311
+      # * <tt>:precision</tt> -
312 312
       #   Specifies the precision for a <tt>:decimal</tt> column. 
313  
-      # * <tt>:scale</tt>:
  313
+      # * <tt>:scale</tt> -
314 314
       #   Specifies the scale for a <tt>:decimal</tt> column. 
315 315
       #
316 316
       # Please be aware of different RDBMS implementations behavior with
4  activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -5,8 +5,8 @@ module CoreExtensions #:nodoc:
5 5
     module Array #:nodoc:
6 6
       module Conversions
7 7
         # Converts the array to comma-seperated sentence where the last element is joined by the connector word. Options:
8  
-        # * <tt>:connector</tt>: The word used to join the last element in arrays with two or more elements (default: "and")
9  
-        # * <tt>:skip_last_comma</tt>: Set to true to return "a, b and c" instead of "a, b, and c".
  8
+        # * <tt>:connector</tt> - The word used to join the last element in arrays with two or more elements (default: "and")
  9
+        # * <tt>:skip_last_comma</tt> - Set to true to return "a, b and c" instead of "a, b, and c".
10 10
         def to_sentence(options = {})
11 11
           options.assert_valid_keys(:connector, :skip_last_comma)
12 12
           options.reverse_merge! :connector => 'and', :skip_last_comma => false
4  activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb
@@ -283,8 +283,8 @@ def capitalize(str)
283 283
       # Returns the KC normalization of the string by default. NFKC is considered the best normalization form for
284 284
       # passing strings to databases and validations.
285 285
       #
286  
-      # * <tt>str</tt>: The string to perform normalization on.
287  
-      # * <tt>form</tt>: The form you want to normalize in. Should be one of the following: :c, :kc, :d or :kd.
  286
+      # * <tt>str</tt> - The string to perform normalization on.
  287
+      # * <tt>form</tt> - The form you want to normalize in. Should be one of the following: :c, :kc, :d or :kd.
288 288
       def normalize(str, form=ActiveSupport::Multibyte::DEFAULT_NORMALIZATION_FORM)
289 289
         # See http://www.unicode.org/reports/tr15, Table 1
290 290
         codepoints = u_unpack(str)

0 notes on commit 9450262

Please sign in to comment.
Something went wrong with that request. Please try again.