From 495722a95687e25114ae75608dd3107ac5d6611b Mon Sep 17 00:00:00 2001 From: Ronak Jangir Date: Wed, 7 Oct 2015 21:07:46 +0530 Subject: =?UTF-8?q?Fixed=20wording=20in=20Assertion=20docs,=20changed=20?= =?UTF-8?q?=E2=80=98Assert=E2=80=99=20->=20=E2=80=98Asserts=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- guides/source/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') 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. -- cgit v1.2.3 From 37b36842330b5db1996fda80e387eae3a5781db8 Mon Sep 17 00:00:00 2001 From: amitkumarsuroliya Date: Wed, 7 Oct 2015 23:05:01 +0530 Subject: Replace `an UNIQUE` with `a UNIQUE` as UNIQUE doesn't have a vowel sound [ci skip] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `A UNIQUE` we pronounce URL as 'yu-ni-k’. We use this everywhere. So, be consistent with it. --- guides/source/3_2_release_notes.md | 2 +- guides/source/active_support_instrumentation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source') 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 e5a560edd0..c181b1c483 100644 --- a/guides/source/active_support_instrumentation.md +++ b/guides/source/active_support_instrumentation.md @@ -457,7 +457,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 -- cgit v1.2.3 From aa37991e436fb4284a16c324ab5115d73784ff38 Mon Sep 17 00:00:00 2001 From: amitkumarsuroliya Date: Sun, 11 Oct 2015 02:40:29 +0530 Subject: Improved `KeyError` messages on bang version, since commit https://github.com/rails/rails/commit/e768c519fb6015e00961702a5165c6dab548a954 bang version produces `KeyError` [ci skip] --- guides/source/security.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source') diff --git a/guides/source/security.md b/guides/source/security.md index 5a6ac9446a..1b74d17dd6 100644 --- a/guides/source/security.md +++ b/guides/source/security.md @@ -1048,7 +1048,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 -- cgit v1.2.3