Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8106

Show
Ignore:
Timestamp:
11/06/07 23:33:40 (1 year ago)
Author:
marcel
Message:

Standardize on using hyphens rather than colons to separate option names from their explanation in documentation. Replace + with tt tags. Closes #8732. [ryanb]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/assertions/response_assertions.rb

    r7934 r8106  
    77      # Asserts that the response is one of the following types: 
    88      # 
    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 
    1313      # 
    1414      # You can also pass an explicit status number like assert_response(501) 
  • trunk/actionpack/lib/action_controller/assertions/selector_assertions.rb

    r8034 r8106  
    327327      # 
    328328      # 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+. 
    331       # 
    332       # Use the argument +:insert+ followed by an insertion position to narrow 
     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>. 
     332      # 
     333      # Use the argument <tt>:insert</tt> followed by an insertion position to narrow 
    333334      # down the assertion to only statements that insert elements in that 
    334       # position. Possible values are +:top+, +:bottom+, +:before+ and +:after+. 
    335       # 
    336       # Using the +:remove+ statement, you will be able to pass a block, but it will 
     335      # position. Possible values are <tt>:top</tt>, <tt>:bottom</tt>, <tt>:before</tt> 
     336      # and <tt>:after</tt>. 
     337      # 
     338      # Using the <tt>:remove</tt> statement, you will be able to pass a block, but it will 
    337339      # be ignored as there is no HTML passed for this statement. 
    338340      # 
  • trunk/actionpack/lib/action_controller/base.rb

    r8035 r8106  
    983983      # Redirects the browser to the target specified in +options+. This parameter can take one of three forms: 
    984984      # 
    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. 
    990990      #   Short-hand for redirect_to(request.env["HTTP_REFERER"]) 
    991991      # 
  • trunk/actionpack/lib/action_controller/verification.rb

    r8009 r8106  
    4343      # is a hash consisting of the following key/value pairs: 
    4444      # 
    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 
    4646      #   be in the <tt>params</tt> hash in order for the action(s) to be safely 
    4747      #   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 
    4949      #   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 
    5151      #   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 
    5353      #   must match the current request method in order for the action(s) to 
    5454      #   be safely called. (The key should be a symbol: <tt>:get</tt> or 
    5555      #   <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 
    5757      #   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 
    5959      #   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 
    6161      #   merged into the response's headers hash if the prerequisites cannot 
    6262      #   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 
    6464      #   redirecting if the prerequisites cannot be satisfied. You can  
    6565      #   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 
    6767      #   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 
    6969      #   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 
    7171      #   specified in the associated array (may also be a single value). 
    7272      def verify(options={}) 
  • trunk/actionpack/lib/action_view/helpers/record_tag_helper.rb

    r6731 r8106  
    3939      # 
    4040      # 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 
    4242      # with the default class name for your object. For example: 
    4343      # 
  • trunk/activerecord/lib/active_record/calculations.rb

    r8061 r8106  
    9898      # 
    9999      # 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). 
    102102      #   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 
    106106      #   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) ... 
    108108      # 
    109109      # Examples: 
  • trunk/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

    r8077 r8106  
    301301      # 
    302302      # Available options are (none of these exists by default): 
    303       # * <tt>:limit</tt>: 
     303      # * <tt>:limit</tt> - 
    304304      #   Requests a maximum column length (<tt>:string</tt>, <tt>:text</tt>, 
    305305      #   <tt>:binary</tt> or <tt>:integer</tt> columns only) 
    306       # * <tt>:default</tt>: 
     306      # * <tt>:default</tt> - 
    307307      #   The column's default value. Use nil for NULL. 
    308       # * <tt>:null</tt>: 
     308      # * <tt>:null</tt> - 
    309309      #   Allows or disallows +NULL+ values in the column.  This option could 
    310310      #   have been named <tt>:null_allowed</tt>. 
    311       # * <tt>:precision</tt>: 
     311      # * <tt>:precision</tt> - 
    312312      #   Specifies the precision for a <tt>:decimal</tt> column.  
    313       # * <tt>:scale</tt>: 
     313      # * <tt>:scale</tt> - 
    314314      #   Specifies the scale for a <tt>:decimal</tt> column.  
    315315      # 
  • trunk/activesupport/lib/active_support/core_ext/array/conversions.rb

    r7773 r8106  
    66      module Conversions 
    77        # 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". 
    1010        def to_sentence(options = {}) 
    1111          options.assert_valid_keys(:connector, :skip_last_comma) 
  • trunk/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb

    r7910 r8106  
    284284      # passing strings to databases and validations. 
    285285      # 
    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. 
    288288      def normalize(str, form=ActiveSupport::Multibyte::DEFAULT_NORMALIZATION_FORM) 
    289289        # See http://www.unicode.org/reports/tr15, Table 1