Changeset 8106
- Timestamp:
- 11/06/07 23:33:40 (1 year ago)
- Files:
-
- trunk/actionpack/lib/action_controller/assertions/response_assertions.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/assertions/selector_assertions.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/verification.rb (modified) (1 diff)
- trunk/actionpack/lib/action_view/helpers/record_tag_helper.rb (modified) (1 diff)
- trunk/activerecord/lib/active_record/calculations.rb (modified) (1 diff)
- trunk/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb (modified) (1 diff)
- trunk/activesupport/lib/active_support/core_ext/array/conversions.rb (modified) (1 diff)
- trunk/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/assertions/response_assertions.rb
r7934 r8106 7 7 # Asserts that the response is one of the following types: 8 8 # 9 # * <tt>:success</tt> :Status code was 20010 # * <tt>:redirect</tt> :Status code was in the 300-399 range11 # * <tt>:missing</tt> :Status code was 40412 # * <tt>:error</tt> :Status code was in the 500-599 range9 # * <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) trunk/actionpack/lib/action_controller/assertions/selector_assertions.rb
r8034 r8106 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+. 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 333 334 # 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 337 339 # be ignored as there is no HTML passed for this statement. 338 340 # trunk/actionpack/lib/action_controller/base.rb
r8035 r8106 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 # trunk/actionpack/lib/action_controller/verification.rb
r8009 r8106 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 must45 # * <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 must48 # * <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 must50 # * <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 which52 # * <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 coming56 # * <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 merged58 # * <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 be60 # * <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 when63 # * <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 when66 # * <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 specified68 # * <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 actions70 # * <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={}) trunk/actionpack/lib/action_view/helpers/record_tag_helper.rb
r6731 r8106 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 combined41 # 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 # trunk/activerecord/lib/active_record/calculations.rb
r8061 r8106 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 not103 # * <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: trunk/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
r8077 r8106 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 # trunk/activesupport/lib/active_support/core_ext/array/conversions.rb
r7773 r8106 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) trunk/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb
r7910 r8106 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