@@ -1794,8 +1794,19 @@ updated via an `around_filter`. The default value is `true`.
1794
1794
1795
1795
# ### `config.action_controller.wrap_parameters_by_default`
1796
1796
1797
- Configures the [` ParamsWrapper` ](https: // api.rubyonrails.org/ classes/ ActionController / ParamsWrapper .html) to wrap json
1798
- request by default.
1797
+ Before Rails 7.0 , new applications were generated with an initializer named
1798
+ ` wrap_parameters.rb` that enabled parameter wrapping in ` ActionController::Base`
1799
+ for JSON requests.
1800
+
1801
+ Setting this configuration value to ` true` has the same behavior as the
1802
+ initializer, allowing applications to remove the initializer if they do not wish
1803
+ to customize parameter wrapping behavior.
1804
+
1805
+ Regardless of this value, applications can continue to customize the parameter
1806
+ wrapping behavior as before in an initializer or per controller.
1807
+
1808
+ See [` ParamsWrapper` ][params_wrapper] for more information on parameter
1809
+ wrapping.
1799
1810
1800
1811
The default value depends on the ` config.load_defaults` target version:
1801
1812
@@ -1804,6 +1815,8 @@ The default value depends on the `config.load_defaults` target version:
1804
1815
| (original) | ` false` |
1805
1816
| 7.0 | ` true` |
1806
1817
1818
+ [params_wrapper]: https: // api.rubyonrails.org/ classes/ ActionController / ParamsWrapper .html
1819
+
1807
1820
# ### `ActionController::Base.wrap_parameters`
1808
1821
1809
1822
Configures the [` ParamsWrapper` ](https: // api.rubyonrails.org/ classes/ ActionController / ParamsWrapper .html). This can be called at
@@ -2128,7 +2141,21 @@ The default value depends on the `config.load_defaults` target version:
2128
2141
2129
2142
#### `config.action_view.button_to_generates_button_tag`
2130
2143
2131
- Determines whether `button_to` will render `<button>` element, regardless of whether or not the content is passed as the first argument or as a block.
2144
+ When `false`, `button_to` will render a `<button>` or an `<input>` inside a
2145
+ `<form>` depending on how content is passed (`<form>` omitted for brevity):
2146
+
2147
+ ```erb
2148
+ <%= button_to "Content", "/" %>
2149
+ # => <input type="submit" value="Content">
2150
+
2151
+ <%= button_to "/" do %>
2152
+ Content
2153
+ <% end %>
2154
+ # => <button type="submit">Content</button>
2155
+ ```
2156
+
2157
+ Setting this value to `true` makes `button_to` generate a `<button>` tag inside
2158
+ the `<form>` in both cases.
2132
2159
2133
2160
The default value depends on the `config.load_defaults` target version:
2134
2161
@@ -2139,7 +2166,8 @@ The default value depends on the `config.load_defaults` target version:
2139
2166
2140
2167
#### `config.action_view.apply_stylesheet_media_default`
2141
2168
2142
- Determines whether `stylesheet_link_tag` will render `screen` as the default value for the attribute `media` when it' s not provided.
2169
+ Determines whether `stylesheet_link_tag` will render `screen` as the default
2170
+ value for the `media` attribute when it' s not provided.
2143
2171
2144
2172
The default value depends on the ` config.load_defaults` target version:
2145
2173
@@ -2243,8 +2271,10 @@ Additionally, it is possible to pass any [configuration option `Mail::SMTP` resp
2243
2271
2244
2272
#### `config.action_mailer.smtp_timeout`
2245
2273
2246
- Allows to configure both the `:open_timeout` and `:read_timeout`
2247
- values for `:smtp` delivery method.
2274
+ Prior to version 2.8.0, the `mail` gem did not configure any default timeouts
2275
+ for its SMTP requests. This configuration enables applications to configure
2276
+ default values for both `:open_timeout` and `:read_timeout` in the `mail` gem so
2277
+ that requests do not end up stuck indefinitely.
2248
2278
2249
2279
The default value depends on the `config.load_defaults` target version:
2250
2280
0 commit comments