mirror of https://github.com/rails/rails
Fixes rubydoc links
Uses gem version of documentation instead of repo version Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
This commit is contained in:
parent
a3475f07cc
commit
eeb14214fd
|
@ -111,7 +111,7 @@ module ActionView
|
|||
|
||||
# Delegates to <tt>I18n.localize</tt> with no additional functionality.
|
||||
#
|
||||
# See https://www.rubydoc.info/github/svenfuchs/i18n/master/I18n/Backend/Base:localize
|
||||
# See https://www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize
|
||||
# for more information.
|
||||
def localize(object, **options)
|
||||
I18n.localize(object, **options)
|
||||
|
|
|
@ -292,7 +292,7 @@ environment's configuration file.
|
|||
|
||||
You can learn more about how to use `Rack::Sendfile` with popular
|
||||
front-ends in [the Rack::Sendfile
|
||||
documentation](https://www.rubydoc.info/github/rack/rack/master/Rack/Sendfile).
|
||||
documentation](https://www.rubydoc.info/gems/rack/Rack/Sendfile).
|
||||
|
||||
Here are some values for this header for some popular servers, once these servers are configured to support
|
||||
accelerated file sending:
|
||||
|
|
|
@ -486,7 +486,7 @@ If neither are specified, it will assume memcached is running on localhost on th
|
|||
config.cache_store = :mem_cache_store # Will fallback to $MEMCACHE_SERVERS, then 127.0.0.1:11211
|
||||
```
|
||||
|
||||
See the [`Dalli::Client` documentation](https://www.rubydoc.info/github/mperham/dalli/Dalli%2FClient:initialize) for supported address types.
|
||||
See the [`Dalli::Client` documentation](https://www.rubydoc.info/gems/dalli/Dalli/Client#initialize-instance_method) for supported address types.
|
||||
|
||||
The `write` and `fetch` methods on this cache accept two additional options that take advantage of features specific to memcached. You can specify `:raw` to send a value directly to the server with no serialization. The value must be a string or number. You can use memcached direct operations like `increment` and `decrement` only on raw values. You can also specify `:unless_exist` if you don't want memcached to overwrite an existing entry.
|
||||
|
||||
|
|
|
@ -450,7 +450,7 @@ Whilst the final section of this guide doesn't cover how to generate the most aw
|
|||
Adding Command Line Arguments
|
||||
-----------------------------
|
||||
|
||||
Rails generators can be easily modified to accept custom command line arguments. This functionality comes from [Thor](https://www.rubydoc.info/github/erikhuda/thor/master/Thor/Base/ClassMethods#class_option-instance_method):
|
||||
Rails generators can be easily modified to accept custom command line arguments. This functionality comes from [Thor](https://www.rubydoc.info/gems/thor/Thor/Base/ClassMethods#class_options-instance_method):
|
||||
|
||||
```ruby
|
||||
class_option :scope, type: :string, default: 'read_products'
|
||||
|
@ -473,7 +473,7 @@ Generator methods
|
|||
|
||||
The following are methods available for both generators and templates for Rails.
|
||||
|
||||
NOTE: Methods provided by Thor are not covered this guide and can be found in [Thor's documentation](https://rdoc.info/github/erikhuda/thor/master/Thor/Actions.html)
|
||||
NOTE: Methods provided by Thor are not covered this guide and can be found in [Thor's documentation](https://www.rubydoc.info/gems/thor/Thor/Actions)
|
||||
|
||||
### `gem`
|
||||
|
||||
|
|
|
@ -356,7 +356,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](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_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/gems/rack/Rack/Utils#HTTP_STATUS_CODES-constant) and how their [mapping](https://rubydoc.info/gems/rack/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.
|
||||
|
|
Loading…
Reference in New Issue