aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/3_1_release_notes.md4
-rw-r--r--guides/source/6_0_release_notes.md12
-rw-r--r--guides/source/action_cable_overview.md17
-rw-r--r--guides/source/action_mailer_basics.md2
-rw-r--r--guides/source/active_record_migrations.md1
-rw-r--r--guides/source/active_record_querying.md1
-rw-r--r--guides/source/active_support_instrumentation.md2
-rw-r--r--guides/source/command_line.md2
-rw-r--r--guides/source/configuring.md4
-rw-r--r--guides/source/engines.md1
-rw-r--r--guides/source/form_helpers.md2
-rw-r--r--guides/source/rails_on_rack.md2
-rw-r--r--guides/source/testing.md6
13 files changed, 43 insertions, 13 deletions
diff --git a/guides/source/3_1_release_notes.md b/guides/source/3_1_release_notes.md
index 9549b0b911..09faeea614 100644
--- a/guides/source/3_1_release_notes.md
+++ b/guides/source/3_1_release_notes.md
@@ -240,7 +240,7 @@ Action Pack
* Added `config.action_controller.include_all_helpers`. By default `helper :all` is done in `ActionController::Base`, which includes all the helpers by default. Setting `include_all_helpers` to `false` will result in including only application_helper and the helper corresponding to controller (like foo_helper for foo_controller).
-* `url_for` and named url helpers now accept `:subdomain` and `:domain` as options.
+* `url_for` and named URL helpers now accept `:subdomain` and `:domain` as options.
* Added `Base.http_basic_authenticate_with` to do simple http basic authentication with a single class method call.
@@ -293,7 +293,7 @@ Action Pack
You can restrict it to some actions by using `:only` or `:except`. Please read the docs at [`ActionController::Streaming`](https://api.rubyonrails.org/v3.1.0/classes/ActionController/Streaming.html) for more information.
-* The redirect route method now also accepts a hash of options which will only change the parts of the url in question, or an object which responds to call, allowing for redirects to be reused.
+* The redirect route method now also accepts a hash of options which will only change the parts of the URL in question, or an object which responds to call, allowing for redirects to be reused.
### Action Dispatch
diff --git a/guides/source/6_0_release_notes.md b/guides/source/6_0_release_notes.md
index 04a02259e9..6c3091153f 100644
--- a/guides/source/6_0_release_notes.md
+++ b/guides/source/6_0_release_notes.md
@@ -237,6 +237,18 @@ Please refer to the [Changelog][active-model] for detailed changes.
### Notable changes
+* Add a configuration option to customize format of the `ActiveModel::Errors#full_message`.
+ ([Pull Request](https://github.com/rails/rails/pull/32956))
+
+* Add support for configuring attribute name for `has_secure_password`.
+ ([Pull Request](https://github.com/rails/rails/pull/26764))
+
+* Add `#slice!` method to `ActiveModel::Errors`.
+ ([Pull Request](https://github.com/rails/rails/pull/34489))
+
+* Add `ActiveModel::Errors#of_kind?` to check presence of a specific error.
+ ([Pull Request](https://github.com/rails/rails/pull/34866))
+
Active Support
--------------
diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md
index c531b6eee2..f1e2a0081f 100644
--- a/guides/source/action_cable_overview.md
+++ b/guides/source/action_cable_overview.md
@@ -190,6 +190,23 @@ This will ready a consumer that'll connect against `/cable` on your server by de
The connection won't be established until you've also specified at least one subscription
you're interested in having.
+The consumer can optionally take an argument that specifies the URL to connect to. This
+can be a string, or a function that returns a string that will be called when the
+WebSocket is opened.
+
+```js
+// Specify a different URL to connect to
+createConsumer('https://ws.example.com/cable')
+
+// Use a function to dynamically generate the URL
+createConsumer(getWebSocketURL)
+
+function getWebSocketURL {
+ const token = localStorage.get('auth-token')
+ return `https://ws.example.com/cable?token=${token}`
+}
+```
+
#### Subscriber
A consumer becomes a subscriber by creating a subscription to a given channel:
diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md
index df74b4ebd0..f600cf29ce 100644
--- a/guides/source/action_mailer_basics.md
+++ b/guides/source/action_mailer_basics.md
@@ -573,7 +573,7 @@ web addresses. Thus, you should always use the "_url" variant of named route
helpers.
If you did not configure the `:host` option globally make sure to pass it to the
-url helper.
+URL helper.
```erb
<%= user_url(@user, host: 'example.com') %>
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md
index 50d4a4c57d..270e4a3bf9 100644
--- a/guides/source/active_record_migrations.md
+++ b/guides/source/active_record_migrations.md
@@ -465,7 +465,6 @@ number of digits after the decimal point.
* `default` Allows to set a default value on the column. Note that if you
are using a dynamic value (such as a date), the default will only be calculated
the first time (i.e. on the date the migration is applied).
-* `index` Adds an index for the column.
* `comment` Adds a comment for the column.
Some adapters may support additional options; see the adapter specific API docs
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index cc6e08aaec..e40f16e62d 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -65,6 +65,7 @@ The methods are:
* `distinct`
* `eager_load`
* `extending`
+* `extract_associated`
* `from`
* `group`
* `having`
diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md
index d7dbc5cea8..e5ed283c45 100644
--- a/guides/source/active_support_instrumentation.md
+++ b/guides/source/active_support_instrumentation.md
@@ -580,7 +580,7 @@ Active Storage
| ------------ | ------------------- |
| `:key` | Secure token |
| `:service` | Name of the service |
-| `:url` | Generated url |
+| `:url` | Generated URL |
Railties
--------
diff --git a/guides/source/command_line.md b/guides/source/command_line.md
index ddb30a3aec..a83724f1bb 100644
--- a/guides/source/command_line.md
+++ b/guides/source/command_line.md
@@ -344,7 +344,7 @@ irb(main):001:0>
Inside the `rails console` you have access to the `app` and `helper` instances.
-With the `app` method you can access url and path helpers, as well as do requests.
+With the `app` method you can access URL and path helpers, as well as do requests.
```bash
>> app.root_path
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index 04ad5a56a2..e1c9fad232 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -310,7 +310,7 @@ All these configuration options are delegated to the `I18n` library.
### Configuring Active Model
-* `config.active_model.i18n_full_message` is a boolean value which controls whether the `full_message` error format can be overridden at the attribute or model level in the locale files. This is `false` by default.
+* `config.active_model.i18n_customize_full_message` is a boolean value which controls whether the `full_message` error format can be overridden at the attribute or model level in the locale files. This is `false` by default.
### Configuring Active Record
@@ -1162,7 +1162,7 @@ Imagine you have a server which mirrors the production environment but is only u
That environment is no different than the default ones, start a server with `rails server -e staging`, a console with `rails console -e staging`, `Rails.env.staging?` works, etc.
-### Deploy to a subdirectory (relative url root)
+### Deploy to a subdirectory (relative URL root)
By default Rails expects that your application is running at the root
(eg. `/`). This section explains how to run your application inside a directory.
diff --git a/guides/source/engines.md b/guides/source/engines.md
index a00311bffb..0b17137270 100644
--- a/guides/source/engines.md
+++ b/guides/source/engines.md
@@ -1518,6 +1518,7 @@ To hook into the initialization process of one of the following classes use the
| `ActiveJob::Base` | `active_job` |
| `ActiveJob::TestCase` | `active_job_test_case` |
| `ActiveRecord::Base` | `active_record` |
+| `ActiveStorage::Attachment` | `active_storage_attachment` |
| `ActiveStorage::Blob` | `active_storage_blob` |
| `ActiveSupport::TestCase` | `active_support_test_case` |
| `i18n` | `i18n` |
diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md
index b6674ae7dd..6418005921 100644
--- a/guides/source/form_helpers.md
+++ b/guides/source/form_helpers.md
@@ -248,7 +248,7 @@ There are a few things to note here:
* `@article` is the actual object being edited.
* There is a single hash of options. HTML options (except `id` and `class`) are passed in the `:html` hash. Also you can provide a `:namespace` option for your form to ensure uniqueness of id attributes on form elements. The scope attribute will be prefixed with underscore on the generated HTML id.
* The `form_with` method yields a **form builder** object (the `f` variable).
-* If you wish to direct your form request to a particular url, you would use `form_with url: my_nifty_url_path` instead. To see more in depth options on what `form_with` accepts be sure to [check out the API documentation](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with).
+* If you wish to direct your form request to a particular URL, you would use `form_with url: my_nifty_url_path` instead. To see more in depth options on what `form_with` accepts be sure to [check out the API documentation](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with).
* Methods to create form controls are called **on** the form builder object `f`.
The resulting HTML is:
diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md
index 69b5f254bf..d60e53b052 100644
--- a/guides/source/rails_on_rack.md
+++ b/guides/source/rails_on_rack.md
@@ -13,7 +13,7 @@ After reading this guide, you will know:
--------------------------------------------------------------------------------
-WARNING: This guide assumes a working knowledge of Rack protocol and Rack concepts such as middlewares, url maps, and `Rack::Builder`.
+WARNING: This guide assumes a working knowledge of Rack protocol and Rack concepts such as middlewares, URL maps, and `Rack::Builder`.
Introduction to Rack
--------------------
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 93372b5c26..1fad02812b 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -1404,7 +1404,7 @@ If you find your helpers are cluttering `test_helper.rb`, you can extract them i
```ruby
# lib/test/multiple_assertions.rb
module MultipleAssertions
- def assert_multiple_of_fourty_two(number)
+ def assert_multiple_of_forty_two(number)
assert (number % 42 == 0), 'expected #{number} to be a multiple of 42'
end
end
@@ -1419,8 +1419,8 @@ require 'test/multiple_assertions'
class NumberTest < ActiveSupport::TestCase
include MultipleAssertions
- test '420 is a multiple of fourty two' do
- assert_multiple_of_fourty_two 420
+ test '420 is a multiple of forty two' do
+ assert_multiple_of_forty_two 420
end
end
```