Skip to content

Commit b71d157

Browse files
authored
Merge pull request rails#43158 from p8/guides/improve-configuring
Small improvements to the Configuring guide [ci-skip]
2 parents 556572a + b403e48 commit b71d157

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

guides/source/active_job_basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ and add this serializer to the list:
455455
Rails.application.config.active_job.custom_serializers << MoneySerializer
456456
```
457457

458-
Note that auto-loading reloadable code during initialization is not supported. Thus it is recommended
458+
Note that autoloading reloadable code during initialization is not supported. Thus it is recommended
459459
to set-up serializers to be loaded only once, e.g. by amending `config/application.rb` like this:
460460

461461
```ruby

guides/source/configuring.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ Rails will use that particular setting to configure Active Record.
4848

4949
WARNING: Use the public configuration methods over calling directly to the associated class. e.g. `Rails.application.config.action_mailer.options` instead of `ActionMailer::Base.options`.
5050

51-
NOTE: If you need to apply configuration directly to a class, use a [lazy load hook](https://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html) in an initializer to avoid auto-loading the class before initialization has completed. This will break because autoloading during initialization cannot be safely repeated when the app reloads.
51+
NOTE: If you need to apply configuration directly to a class, use a [lazy load hook](https://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html) in an initializer to avoid autoloading the class before initialization has completed. This will break because autoloading during initialization cannot be safely repeated when the app reloads.
5252

5353
### Rails General Configuration
5454

55-
These configuration methods are to be called on a `Rails::Railtie` object, such as a subclass of `Rails::Engine` or `Rails::Application`.
55+
The following configuration methods are to be called on a `Rails::Railtie` object, such as a subclass of `Rails::Engine` or `Rails::Application`.
5656

5757
#### `config.after_initialize`
5858

@@ -103,7 +103,7 @@ Is a flag. If `true` then any error will cause detailed debugging information to
103103

104104
#### `config.console`
105105

106-
Allows you to set class that will be used as console you run `bin/rails console`. It's best to run it in `console` block:
106+
Allows you to set the class that will be used as console when you run `bin/rails console`. It's best to run it in the `console` block:
107107

108108
```ruby
109109
console do
@@ -124,23 +124,23 @@ When `true`, eager loads all registered `config.eager_load_namespaces`. This inc
124124

125125
#### `config.eager_load_namespaces`
126126

127-
Registers namespaces that are eager loaded when `config.eager_load` is `true`. All namespaces in the list must respond to the `eager_load!` method.
127+
Registers namespaces that are eager loaded when `config.eager_load` is set to `true`. All namespaces in the list must respond to the `eager_load!` method.
128128

129129
#### `config.eager_load_paths`
130130

131-
Accepts an array of paths from which Rails will eager load on boot if cache classes is enabled. Defaults to every folder in the `app` directory of the application.
131+
Accepts an array of paths from which Rails will eager load on boot if `config.cache_classes` is set to `true`. Defaults to every folder in the `app` directory of the application.
132132

133133
#### `config.enable_dependency_loading`
134134

135-
When true, enables autoloading, even if the application is eager loaded and `config.cache_classes` is set as true. Defaults to false.
135+
When true, enables autoloading, even if the application is eager loaded and `config.cache_classes` is set to `true`. Defaults to false.
136136

137137
#### `config.encoding`
138138

139139
Sets up the application-wide encoding. Defaults to UTF-8.
140140

141141
#### `config.exceptions_app`
142142

143-
Sets the exceptions application invoked by the ShowException middleware when an exception happens. Defaults to `ActionDispatch::PublicExceptions.new(Rails.public_path)`.
143+
Sets the exceptions application invoked by the `ShowException` middleware when an exception happens. Defaults to `ActionDispatch::PublicExceptions.new(Rails.public_path)`.
144144

145145
#### `config.debug_exception_response_format`
146146

@@ -153,7 +153,7 @@ Is the class used to detect file updates in the file system when `config.reload_
153153
#### `config.filter_parameters`
154154

155155
Used for filtering out the parameters that you don't want shown in the logs, such as passwords or credit card
156-
numbers. It also filters out sensitive values of database columns when call `#inspect` on an Active Record object. By default, Rails filters out passwords by adding `Rails.application.config.filter_parameters += [:password]` in `config/initializers/filter_parameter_logging.rb`. Parameters filter works by partial matching regular expression.
156+
numbers. It also filters out sensitive values of database columns when calling `#inspect` on an Active Record object. By default, Rails filters out passwords by adding `Rails.application.config.filter_parameters += [:password]` in `config/initializers/filter_parameter_logging.rb`. Parameters filter works by partial matching regular expression.
157157

158158
#### `config.force_ssl`
159159

@@ -173,7 +173,7 @@ Defines the verbosity of the Rails logger. This option defaults to `:debug` for
173173

174174
#### `config.log_tags`
175175

176-
Accepts a list of: methods that the `request` object responds to, a `Proc` that accepts the `request` object, or something that responds to `to_s`. This makes it easy to tag log lines with debug information like subdomain and request id - both very helpful in debugging multi-user production applications.
176+
Accepts a list of methods that the `request` object responds to, a `Proc` that accepts the `request` object, or something that responds to `to_s`. This makes it easy to tag log lines with debug information like subdomain and request id - both very helpful in debugging multi-user production applications.
177177

178178
#### `config.logger`
179179

@@ -726,8 +726,8 @@ When true, will always include column names in `SELECT` statements, and avoid wi
726726

727727
#### `config.active_record.destroy_all_in_batches`
728728

729-
Ensures ActiveRecord::Relation#destroy_all to perform the record's deletion in
730-
batches. ActiveRecord::Relation#destroy_all won't longer return the collection
729+
Ensures `ActiveRecord::Relation#destroy_all` performs the record's deletion in
730+
batches. `ActiveRecord::Relation#destroy_all` will no longer return the collection
731731
of the deleted records after enabling this option.
732732
733733
#### `config.active_record.verify_foreign_keys_for_fixtures`
@@ -764,7 +764,7 @@ Controls whether the Active Record MySQL adapter will consider all `tinyint(1)`
764764
765765
#### `ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_table`
766766
767-
Controls whether database tables created by PostgreSQL should be "unlogged," which can speed
767+
Controls whether database tables created by PostgreSQL should be "unlogged", which can speed
768768
up performance but adds a risk of data loss if the database crashes. It is
769769
highly recommended that you do not enable this in a production environment.
770770
Defaults to `false` in all environments.

0 commit comments

Comments
 (0)