diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2015-10-31 17:01:41 +0000 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2015-10-31 17:01:41 +0000 |
commit | b217354dbbbbb49a020b0073ebb62c5cd2d96140 (patch) | |
tree | b4bbbf8cf1e5223f21e81856a62b9b53c88713a6 /guides/source | |
parent | e913834e92845b09c2e5be6394b63702c538764b (diff) | |
parent | e9a8b15778adeeda8dfccd2af6ca86b7e6bda575 (diff) | |
download | rails-b217354dbbbbb49a020b0073ebb62c5cd2d96140.tar.gz rails-b217354dbbbbb49a020b0073ebb62c5cd2d96140.tar.bz2 rails-b217354dbbbbb49a020b0073ebb62c5cd2d96140.zip |
Merge branch 'master' of github.com:rails/docrails
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/3_2_release_notes.md | 2 | ||||
-rw-r--r-- | guides/source/active_support_instrumentation.md | 2 | ||||
-rw-r--r-- | guides/source/security.md | 2 | ||||
-rw-r--r-- | guides/source/testing.md | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/3_2_release_notes.md b/guides/source/3_2_release_notes.md index f6871c186e..f16d509f77 100644 --- a/guides/source/3_2_release_notes.md +++ b/guides/source/3_2_release_notes.md @@ -154,7 +154,7 @@ Railties rails g scaffold Post title:string:index author:uniq price:decimal{7,2} ``` - will create indexes for `title` and `author` with the latter being an unique index. Some types such as decimal accept custom options. In the example, `price` will be a decimal column with precision and scale set to 7 and 2 respectively. + will create indexes for `title` and `author` with the latter being a unique index. Some types such as decimal accept custom options. In the example, `price` will be a decimal column with precision and scale set to 7 and 2 respectively. * Turn gem has been removed from default Gemfile. diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md index f495acbf68..0fd0112c9f 100644 --- a/guides/source/active_support_instrumentation.md +++ b/guides/source/active_support_instrumentation.md @@ -458,7 +458,7 @@ The block receives the following arguments: * The name of the event * Time when it started * Time when it finished -* An unique ID for this event +* A unique ID for this event * The payload (described in previous sections) ```ruby diff --git a/guides/source/security.md b/guides/source/security.md index fb9ee7b412..df8c24864e 100644 --- a/guides/source/security.md +++ b/guides/source/security.md @@ -1046,7 +1046,7 @@ If you want an exception to be raised when some key is blank, use the bang version: ```ruby -Rails.application.secrets.some_api_key! # => raises KeyError +Rails.application.secrets.some_api_key! # => raises KeyError: key not found: :some_api_key ``` Additional Resources diff --git a/guides/source/testing.md b/guides/source/testing.md index 435de30acc..a07772036b 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -319,7 +319,7 @@ Rails adds some custom assertions of its own to the `minitest` framework: | `assert_recognizes(expected_options, path, extras={}, message=nil)` | Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.| | `assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)` | Asserts that the provided options can be used to generate the provided path. This is the inverse of assert_recognizes. The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures.| | `assert_response(type, message = nil)` | Asserts that the response comes with a specific status code. You can specify `:success` to indicate 200-299, `:redirect` to indicate 300-399, `:missing` to indicate 404, or `:error` to match the 500-599 range. You can also pass an explicit status number or its symbolic equivalent. For more information, see [full list of status codes](http://rubydoc.info/github/rack/rack/master/Rack/Utils#HTTP_STATUS_CODES-constant) and how their [mapping](http://rubydoc.info/github/rack/rack/master/Rack/Utils#SYMBOL_TO_STATUS_CODE-constant) works.| -| `assert_redirected_to(options = {}, message=nil)` | Assert that the redirection options passed in match those of the redirect called in the latest action. This match can be partial, such that `assert_redirected_to(controller: "weblog")` will also match the redirection of `redirect_to(controller: "weblog", action: "show")` and so on. You can also pass named routes such as `assert_redirected_to root_path` and Active Record objects such as `assert_redirected_to @article`.| +| `assert_redirected_to(options = {}, message=nil)` | Asserts that the redirection options passed in match those of the redirect called in the latest action. This match can be partial, such that `assert_redirected_to(controller: "weblog")` will also match the redirection of `redirect_to(controller: "weblog", action: "show")` and so on. You can also pass named routes such as `assert_redirected_to root_path` and Active Record objects such as `assert_redirected_to @article`.| You'll see the usage of some of these assertions in the next chapter. |