diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index c7b82c4d42..3d80beb71a 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -182,7 +182,7 @@ Conversation.statuses # => { "active" => 0, "archived" => 1 } ``` See its -[documentation](http://api.rubyonrails.org/v4.1.0/classes/ActiveRecord/Enum.html) +[documentation](https://api.rubyonrails.org/v4.1.0/classes/ActiveRecord/Enum.html) for a detailed write up. ### Message Verifiers @@ -338,7 +338,7 @@ for detailed changes. array. ([Pull Request](https://github.com/rails/rails/pull/9599)) * Added `session#fetch` method fetch behaves similarly to - [Hash#fetch](http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch), + [Hash#fetch](https://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch), with the exception that the returned value is always saved into the session. ([Pull Request](https://github.com/rails/rails/pull/12692)) diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md index 80f68f249e..f763630d3f 100644 --- a/guides/source/4_2_release_notes.md +++ b/guides/source/4_2_release_notes.md @@ -256,7 +256,7 @@ deprecation warnings because it is opt-in. `rails-deprecated_sanitizer` will be supported for Rails 4.2 only; it will not be maintained for Rails 5.0. -See [this blog post](http://blog.plataformatec.com.br/2014/07/the-new-html-sanitizer-in-rails-4-2/) +See [this blog post](https://blog.plataformatec.com.br/2014/07/the-new-html-sanitizer-in-rails-4-2/) for more details on the changes in the new sanitizer. ### `assert_select` diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 2a23edc07c..6ef9f98a21 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -144,9 +144,9 @@ This will generate the singular URL `/basket` instead of the usual `/baskets/:id The `direct` method allows creation of custom URL helpers. ```ruby -direct(:homepage) { "http://www.rubyonrails.org" } +direct(:homepage) { "https://rubyonrails.org" } -homepage_url # => "http://www.rubyonrails.org" +homepage_url # => "https://rubyonrails.org" ``` The return value of the block must be a valid argument for the `url_for` diff --git a/guides/source/active_record_postgresql.md b/guides/source/active_record_postgresql.md index 60e765f4f2..85777e4076 100644 --- a/guides/source/active_record_postgresql.md +++ b/guides/source/active_record_postgresql.md @@ -448,10 +448,10 @@ A point is casted to an array containing `x` and `y` coordinates. ### Interval -* [type definition](http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-INTERVAL-INPUT) -* [functions and operators](http://www.postgresql.org/docs/current/static/functions-datetime.html) +* [type definition](https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-INTERVAL-INPUT) +* [functions and operators](https://www.postgresql.org/docs/current/static/functions-datetime.html) -This type is mapped to [`ActiveSupport::Duration`](http://api.rubyonrails.org/classes/ActiveSupport/Duration.html) objects. +This type is mapped to [`ActiveSupport::Duration`](https://api.rubyonrails.org/classes/ActiveSupport/Duration.html) objects. ```ruby # db/migrate/20200120000000_create_events.rb diff --git a/guides/source/routing.md b/guides/source/routing.md index 98e0df7f23..bc51e8f97a 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -974,11 +974,11 @@ You can create custom URL helpers directly by calling [`direct`][]. For example: ```ruby direct :homepage do - "http://www.rubyonrails.org" + "https://rubyonrails.org" end # >> homepage_url -# => "http://www.rubyonrails.org" +# => "https://rubyonrails.org" ``` The return value of the block must be a valid argument for the `url_for` method. So, you can pass a valid string URL, Hash, Array, an Active Model instance, or an Active Model class. diff --git a/guides/source/testing.md b/guides/source/testing.md index 92b2739abd..603d8ef367 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -355,7 +355,7 @@ Rails adds some custom assertions of its own to the `minitest` framework: | [`assert_nothing_raised { block }`](https://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_nothing_raised) | Ensures that the given block doesn't raise any exceptions.| | [`assert_recognizes(expected_options, path, extras={}, message=nil)`](https://api.rubyonrails.org/classes/ActionDispatch/Assertions/RoutingAssertions.html#method-i-assert_recognizes) | 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)`](https://api.rubyonrails.org/classes/ActionDispatch/Assertions/RoutingAssertions.html#method-i-assert_generates) | 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)`](https://api.rubyonrails.org/classes/ActionDispatch/Assertions/ResponseAssertions.html#method-i-assert_response) | 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](https://rubydoc.info/github/rack/rack/master/Rack/Utils#SYMBOL_TO_STATUS_CODE-constant) works.| +| [`assert_response(type, message = nil)`](https://api.rubyonrails.org/classes/ActionDispatch/Assertions/ResponseAssertions.html#method-i-assert_response) | 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](https://rubydoc.info/github/rack/rack/master/Rack/Utils#HTTP_STATUS_CODES-constant) and how their [mapping](https://rubydoc.info/github/rack/rack/master/Rack/Utils#SYMBOL_TO_STATUS_CODE-constant) works.| | [`assert_redirected_to(options = {}, message=nil)`](https://api.rubyonrails.org/classes/ActionDispatch/Assertions/ResponseAssertions.html#method-i-assert_redirected_to) | Asserts that the response is a redirect to a URL matching the given options. 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.