diff options
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/5_0_release_notes.md | 10 | ||||
-rw-r--r-- | guides/source/action_view_overview.md | 2 | ||||
-rw-r--r-- | guides/source/active_support_core_extensions.md | 14 | ||||
-rw-r--r-- | guides/source/configuring.md | 4 |
4 files changed, 18 insertions, 12 deletions
diff --git a/guides/source/5_0_release_notes.md b/guides/source/5_0_release_notes.md index a699bcf684..e504514e72 100644 --- a/guides/source/5_0_release_notes.md +++ b/guides/source/5_0_release_notes.md @@ -284,7 +284,7 @@ Please refer to the [Changelog][action-view] for detailed changes. directive inside templates. ([Pull Request](https://github.com/rails/rails/pull/20781)) -* Add wildcard matching to explicit dependencies. +* Added wildcard matching to explicit dependencies. ([Pull Request](https://github.com/rails/rails/pull/20904)) * Make `disable_with` the default behavior for submit tags. Disables the @@ -375,7 +375,7 @@ Please refer to the [Changelog][active-record] for detailed changes. * Removed support for the legacy `mysql` database adapter from core. It will live on in a separate gem for now, but most users should just use `mysql2`. -* Remove support for the `protected_attributes` gem. +* Removed support for the `protected_attributes` gem. ([commit](https://github.com/rails/rails/commit/f4fbc0301021f13ae05c8e941c8efc4ae351fdf9)) ### Deprecations @@ -431,6 +431,10 @@ Please refer to the [Changelog][active-record] for detailed changes. `#table_exists?` will check only tables in the future. ([Pull Request](https://github.com/rails/rails/pull/21601)) +* Deprecate sending the `offset` argument to `find_nth`. Please use the + `offset` method on relation instead. + ([Pull Request](https://github.com/rails/rails/pull/22053)) + ### Notable changes * Added a `foreign_key` option to `references` while creating the table. @@ -646,7 +650,7 @@ Please refer to the [Changelog][active-support] for detailed changes. ([Pull Request](https://github.com/rails/rails/pull/16938)) * Removed deprecated `ThreadSafe::Cache`. Use `Concurrent::Map` instead. - ([Pull Request](https://github.com/rails/rails/pull/16938)) + ([Pull Request](https://github.com/rails/rails/pull/21679)) ### Deprecations diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md index d9037674ca..543937f8e5 100644 --- a/guides/source/action_view_overview.md +++ b/guides/source/action_view_overview.md @@ -599,7 +599,7 @@ This would add something like "Process data files (0.34523)" to the log, which y #### cache -A method for caching fragments of a view rather than an entire action or page. This technique is useful caching pieces like menus, lists of news topics, static HTML fragments, and so on. This method takes a block that contains the content you wish to cache. See `ActionController::Caching::Fragments` for more information. +A method for caching fragments of a view rather than an entire action or page. This technique is useful for caching pieces like menus, lists of news topics, static HTML fragments, and so on. This method takes a block that contains the content you wish to cache. See `ActionController::Caching::Fragments` for more information. ```erb <% cache do %> diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index 0cb34aa8bc..0aca6db9b6 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -2024,12 +2024,14 @@ Produce a string representation of a number rounded to a precision: Produce a string representation of a number as a human-readable number of bytes: ```ruby -123.to_s(:human_size) # => 123 Bytes -1234.to_s(:human_size) # => 1.21 KB -12345.to_s(:human_size) # => 12.1 KB -1234567.to_s(:human_size) # => 1.18 MB -1234567890.to_s(:human_size) # => 1.15 GB -1234567890123.to_s(:human_size) # => 1.12 TB +123.to_s(:human_size) # => 123 Bytes +1234.to_s(:human_size) # => 1.21 KB +12345.to_s(:human_size) # => 12.1 KB +1234567.to_s(:human_size) # => 1.18 MB +1234567890.to_s(:human_size) # => 1.15 GB +1234567890123.to_s(:human_size) # => 1.12 TB +1234567890123456.to_s(:human_size) # => 1.1 PB +1234567890123456789.to_s(:human_size) # => 1.07 EB ``` Produce a string representation of a number in human-readable words: diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 47acff7c3f..81e406ae2e 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -104,7 +104,7 @@ application. Accepts a valid week day symbol (e.g. `:monday`). you don't want shown in the logs, such as passwords or credit card numbers. New applications filter out passwords by adding the following `config.filter_parameters+=[:password]` in `config/initializers/filter_parameter_logging.rb`. -* `config.force_ssl` forces all requests to be under HTTPS protocol by using `ActionDispatch::SSL` middleware. +* `config.force_ssl` forces all requests to be served over HTTPS by using the `ActionDispatch::SSL` middleware. This can be configured by setting `config.ssl_options` - see the [ActionDispatch::SSL documentation](http://edgeapi.rubyonrails.org/classes/ActionDispatch/SSL.html) for details. * `config.log_formatter` defines the formatter of the Rails logger. This option defaults to an instance of `ActiveSupport::Logger::SimpleFormatter` for all modes except production, where it defaults to `Logger::Formatter`. @@ -198,7 +198,7 @@ The full set of methods that can be used in this block are as follows: Every Rails application comes with a standard set of middleware which it uses in this order in the development environment: -* `ActionDispatch::SSL` forces every request to be under HTTPS protocol. Will be available if `config.force_ssl` is set to `true`. Options passed to this can be configured by using `config.ssl_options`. +* `ActionDispatch::SSL` forces every request to be served using HTTPS. Enabled if `config.force_ssl` is set to `true`. Options passed to this can be configured by setting `config.ssl_options`. * `ActionDispatch::Static` is used to serve static assets. Disabled if `config.public_file_server.enabled` is `false`. Set `config.public_file_server.index_name` if you need to serve a static directory index file that is not named `index`. For example, to serve `main.html` instead of `index.html` for directory requests, set `config.public_file_server.index_name` to `"main"`. * `Rack::Lock` wraps the app in mutex so it can only be called by a single thread at a time. Only enabled when `config.cache_classes` is `false`. * `ActiveSupport::Cache::Strategy::LocalCache` serves as a basic memory backed cache. This cache is not thread safe and is intended only for serving as a temporary memory cache for a single thread. |