actionview 6.0.6.1 → 6.1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +248 -220
- data/MIT-LICENSE +1 -2
- data/lib/action_view/base.rb +18 -49
- data/lib/action_view/cache_expiry.rb +1 -2
- data/lib/action_view/dependency_tracker.rb +10 -4
- data/lib/action_view/digestor.rb +3 -2
- data/lib/action_view/gem_version.rb +3 -3
- data/lib/action_view/helpers/asset_tag_helper.rb +57 -17
- data/lib/action_view/helpers/asset_url_helper.rb +6 -4
- data/lib/action_view/helpers/atom_feed_helper.rb +2 -1
- data/lib/action_view/helpers/cache_helper.rb +10 -16
- data/lib/action_view/helpers/date_helper.rb +6 -5
- data/lib/action_view/helpers/form_helper.rb +66 -30
- data/lib/action_view/helpers/form_options_helper.rb +7 -16
- data/lib/action_view/helpers/form_tag_helper.rb +4 -3
- data/lib/action_view/helpers/javascript_helper.rb +3 -3
- data/lib/action_view/helpers/number_helper.rb +6 -6
- data/lib/action_view/helpers/rendering_helper.rb +11 -3
- data/lib/action_view/helpers/tag_helper.rb +98 -22
- data/lib/action_view/helpers/tags/base.rb +10 -6
- data/lib/action_view/helpers/tags/check_box.rb +1 -1
- data/lib/action_view/helpers/tags/date_field.rb +1 -1
- data/lib/action_view/helpers/tags/date_select.rb +2 -2
- data/lib/action_view/helpers/tags/datetime_local_field.rb +1 -1
- data/lib/action_view/helpers/tags/hidden_field.rb +4 -0
- data/lib/action_view/helpers/tags/label.rb +4 -0
- data/lib/action_view/helpers/tags/month_field.rb +1 -1
- data/lib/action_view/helpers/tags/select.rb +1 -1
- data/lib/action_view/helpers/tags/time_field.rb +1 -1
- data/lib/action_view/helpers/tags/week_field.rb +1 -1
- data/lib/action_view/helpers/text_helper.rb +2 -2
- data/lib/action_view/helpers/translation_helper.rb +88 -50
- data/lib/action_view/helpers/url_helper.rb +136 -24
- data/lib/action_view/layouts.rb +3 -2
- data/lib/action_view/log_subscriber.rb +26 -10
- data/lib/action_view/lookup_context.rb +3 -18
- data/lib/action_view/path_set.rb +0 -3
- data/lib/action_view/railtie.rb +39 -46
- data/lib/action_view/renderer/abstract_renderer.rb +93 -14
- data/lib/action_view/renderer/collection_renderer.rb +196 -0
- data/lib/action_view/renderer/object_renderer.rb +34 -0
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +25 -26
- data/lib/action_view/renderer/partial_renderer.rb +20 -282
- data/lib/action_view/renderer/renderer.rb +44 -1
- data/lib/action_view/renderer/streaming_template_renderer.rb +5 -1
- data/lib/action_view/renderer/template_renderer.rb +15 -12
- data/lib/action_view/rendering.rb +3 -1
- data/lib/action_view/routing_url_for.rb +1 -1
- data/lib/action_view/template/handlers/erb/erubi.rb +9 -7
- data/lib/action_view/template/handlers/erb.rb +10 -14
- data/lib/action_view/template/handlers.rb +0 -26
- data/lib/action_view/template/html.rb +1 -11
- data/lib/action_view/template/raw_file.rb +0 -3
- data/lib/action_view/template/renderable.rb +24 -0
- data/lib/action_view/template/resolver.rb +82 -40
- data/lib/action_view/template/text.rb +0 -3
- data/lib/action_view/template.rb +9 -49
- data/lib/action_view/test_case.rb +18 -25
- data/lib/action_view/testing/resolvers.rb +10 -31
- data/lib/action_view/unbound_template.rb +3 -3
- data/lib/action_view/view_paths.rb +34 -36
- data/lib/action_view.rb +4 -1
- data/lib/assets/compiled/rails-ujs.js +38 -7
- metadata +15 -12
data/CHANGELOG.md
CHANGED
@@ -1,24 +1,51 @@
|
|
1
|
-
## Rails 6.
|
1
|
+
## Rails 6.1.7.6 (August 22, 2023) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails 6.
|
6
|
+
## Rails 6.1.7.5 (August 22, 2023) ##
|
7
7
|
|
8
8
|
* No changes.
|
9
9
|
|
10
10
|
|
11
|
-
## Rails 6.
|
11
|
+
## Rails 6.1.7.4 (June 26, 2023) ##
|
12
12
|
|
13
13
|
* No changes.
|
14
14
|
|
15
15
|
|
16
|
-
## Rails 6.
|
16
|
+
## Rails 6.1.7.3 (March 13, 2023) ##
|
17
|
+
|
18
|
+
* Ignore certain data-* attributes in rails-ujs when element is contenteditable
|
19
|
+
|
20
|
+
[CVE-2023-23913]
|
21
|
+
|
22
|
+
|
23
|
+
## Rails 6.1.7.2 (January 24, 2023) ##
|
24
|
+
|
25
|
+
* No changes.
|
26
|
+
|
27
|
+
|
28
|
+
## Rails 6.1.7.1 (January 17, 2023) ##
|
29
|
+
|
30
|
+
* No changes.
|
31
|
+
|
32
|
+
|
33
|
+
## Rails 6.1.7 (September 09, 2022) ##
|
34
|
+
|
35
|
+
* No changes.
|
36
|
+
|
37
|
+
|
38
|
+
## Rails 6.1.6.1 (July 12, 2022) ##
|
39
|
+
|
40
|
+
* No changes.
|
41
|
+
|
42
|
+
|
43
|
+
## Rails 6.1.6 (May 09, 2022) ##
|
17
44
|
|
18
45
|
* No changes.
|
19
46
|
|
20
47
|
|
21
|
-
## Rails 6.
|
48
|
+
## Rails 6.1.5.1 (April 26, 2022) ##
|
22
49
|
|
23
50
|
* Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
|
24
51
|
|
@@ -29,405 +56,406 @@
|
|
29
56
|
|
30
57
|
*Álvaro Martín Fraguas*
|
31
58
|
|
59
|
+
## Rails 6.1.5 (March 09, 2022) ##
|
32
60
|
|
33
|
-
|
61
|
+
* `preload_link_tag` properly inserts `as` attributes for files with `image` MIME
|
62
|
+
types, such as JPG or SVG.
|
34
63
|
|
35
|
-
*
|
64
|
+
*Nate Berkopec*
|
36
65
|
|
66
|
+
* Add `autocomplete="off"` to all generated hidden fields.
|
37
67
|
|
38
|
-
|
68
|
+
Fixes #42610.
|
39
69
|
|
40
|
-
*
|
70
|
+
*Ryan Baumann*
|
41
71
|
|
72
|
+
* Fix `current_page?` when URL has trailing slash.
|
42
73
|
|
43
|
-
|
74
|
+
This fixes the `current_page?` helper when the given URL has a trailing slash,
|
75
|
+
and is an absolute URL or also has query params.
|
44
76
|
|
45
|
-
|
77
|
+
Fixes #33956.
|
78
|
+
|
79
|
+
*Jonathan Hefner*
|
46
80
|
|
47
81
|
|
48
|
-
## Rails 6.
|
82
|
+
## Rails 6.1.4.7 (March 08, 2022) ##
|
49
83
|
|
50
84
|
* No changes.
|
51
85
|
|
52
86
|
|
53
|
-
## Rails 6.
|
87
|
+
## Rails 6.1.4.6 (February 11, 2022) ##
|
54
88
|
|
55
89
|
* No changes.
|
56
90
|
|
57
91
|
|
58
|
-
## Rails 6.
|
92
|
+
## Rails 6.1.4.5 (February 11, 2022) ##
|
59
93
|
|
60
94
|
* No changes.
|
61
95
|
|
62
96
|
|
63
|
-
## Rails 6.
|
97
|
+
## Rails 6.1.4.4 (December 15, 2021) ##
|
64
98
|
|
65
99
|
* No changes.
|
66
100
|
|
67
101
|
|
68
|
-
## Rails 6.
|
69
|
-
|
70
|
-
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
71
|
-
call safe_list_sanitizer's class method
|
72
|
-
|
73
|
-
Fixes #39586
|
102
|
+
## Rails 6.1.4.3 (December 14, 2021) ##
|
74
103
|
|
75
|
-
|
104
|
+
* No changes.
|
76
105
|
|
77
106
|
|
78
|
-
## Rails 6.
|
107
|
+
## Rails 6.1.4.2 (December 14, 2021) ##
|
79
108
|
|
80
109
|
* No changes.
|
81
110
|
|
82
111
|
|
83
|
-
## Rails 6.
|
112
|
+
## Rails 6.1.4.1 (August 19, 2021) ##
|
84
113
|
|
85
114
|
* No changes.
|
86
115
|
|
87
116
|
|
88
|
-
## Rails 6.
|
117
|
+
## Rails 6.1.4 (June 24, 2021) ##
|
89
118
|
|
90
|
-
*
|
119
|
+
* The `translate` helper now passes `default` values that aren't
|
120
|
+
translation keys through `I18n.translate` for interpolation.
|
91
121
|
|
122
|
+
*Jonathan Hefner*
|
92
123
|
|
93
|
-
|
124
|
+
* Don't attach UJS form submission handlers to Turbo forms.
|
94
125
|
|
95
|
-
*
|
126
|
+
*David Heinemeier Hansson*
|
96
127
|
|
128
|
+
* Allow both `current_page?(url_hash)` and `current_page?(**url_hash)` on Ruby 2.7.
|
97
129
|
|
98
|
-
|
130
|
+
*Ryuta Kamizono*
|
99
131
|
|
100
|
-
* [CVE-2020-8185] Fix potential XSS vulnerability in the `translate`/`t` helper.
|
101
132
|
|
102
|
-
|
133
|
+
## Rails 6.1.3.2 (May 05, 2021) ##
|
134
|
+
|
135
|
+
* No changes.
|
103
136
|
|
104
137
|
|
105
|
-
## Rails 6.
|
138
|
+
## Rails 6.1.3.1 (March 26, 2021) ##
|
106
139
|
|
107
140
|
* No changes.
|
108
141
|
|
109
142
|
|
110
|
-
## Rails 6.
|
143
|
+
## Rails 6.1.3 (February 17, 2021) ##
|
111
144
|
|
112
|
-
*
|
145
|
+
* No changes.
|
113
146
|
|
114
147
|
|
115
|
-
## Rails 6.
|
148
|
+
## Rails 6.1.2.1 (February 10, 2021) ##
|
116
149
|
|
117
|
-
*
|
118
|
-
template in the backtrace are surfaced properly by DebugExceptions.
|
150
|
+
* No changes.
|
119
151
|
|
120
|
-
*Guilherme Mansur*, *Kasper Timm Hansen*
|
121
152
|
|
122
|
-
|
153
|
+
## Rails 6.1.2 (February 09, 2021) ##
|
123
154
|
|
124
|
-
|
155
|
+
* No changes.
|
125
156
|
|
126
157
|
|
127
|
-
## Rails 6.
|
158
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
128
159
|
|
129
|
-
* Fix
|
160
|
+
* Fix lazy translation in partial with block.
|
130
161
|
|
131
|
-
|
162
|
+
*Marek Kasztelnik*
|
132
163
|
|
133
|
-
|
164
|
+
* Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
|
134
165
|
|
166
|
+
*aar0nr*
|
135
167
|
|
136
|
-
|
168
|
+
* Link preloading keep integrity hashes in the header.
|
137
169
|
|
138
|
-
|
170
|
+
*Étienne Barrié*
|
139
171
|
|
172
|
+
* Add `config.action_view.preload_links_header` to allow disabling of
|
173
|
+
the `Link` header being added by default when using `stylesheet_link_tag`
|
174
|
+
and `javascript_include_tag`.
|
140
175
|
|
141
|
-
|
176
|
+
*Andrew White*
|
142
177
|
|
143
|
-
*
|
178
|
+
* The `translate` helper now resolves `default` values when a `nil` key is
|
179
|
+
specified, instead of always returning `nil`.
|
144
180
|
|
181
|
+
*Jonathan Hefner*
|
145
182
|
|
146
|
-
## Rails 6.0.1 (November 5, 2019) ##
|
147
183
|
|
148
|
-
|
184
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
149
185
|
|
150
|
-
|
186
|
+
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
187
|
+
call safe_list_sanitizer's class method
|
151
188
|
|
189
|
+
Fixes #39586
|
152
190
|
|
153
|
-
|
191
|
+
*Taufiq Muhammadi*
|
154
192
|
|
155
|
-
*
|
193
|
+
* Change form_with to generate non-remote forms by default.
|
156
194
|
|
157
|
-
|
195
|
+
`form_with` would generate a remote form by default. This would confuse
|
196
|
+
users because they were forced to handle remote requests.
|
158
197
|
|
198
|
+
All new 6.1 applications will generate non-remote forms by default.
|
199
|
+
When upgrading a 6.0 application you can enable remote forms by default by
|
200
|
+
setting `config.action_view.form_with_generates_remote_forms` to `true`.
|
159
201
|
|
160
|
-
|
202
|
+
*Petrik de Heus*
|
161
203
|
|
162
|
-
*
|
204
|
+
* Yield translated strings to calls of `ActionView::FormBuilder#button`
|
205
|
+
when a block is given.
|
163
206
|
|
164
|
-
*
|
207
|
+
*Sean Doyle*
|
165
208
|
|
209
|
+
* Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
|
210
|
+
`#to_s` so that `form.label` calls can yield that value to their blocks.
|
166
211
|
|
167
|
-
|
212
|
+
*Sean Doyle*
|
168
213
|
|
169
|
-
*
|
214
|
+
* Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
|
215
|
+
and make the original available as an alias.
|
170
216
|
|
171
|
-
|
172
|
-
|
173
|
-
only renders the first one when `cached` is set to true. But it should render all
|
174
|
-
5 items instead.
|
217
|
+
token_list("foo", "foo bar")
|
218
|
+
# => "foo bar"
|
175
219
|
|
176
|
-
|
220
|
+
*Sean Doyle*
|
177
221
|
|
178
|
-
|
222
|
+
* ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
|
223
|
+
values. This is useful when declaring lists of label text identifiers in
|
224
|
+
`aria-labelledby` or `aria-describedby`.
|
179
225
|
|
180
|
-
|
226
|
+
tag.input type: 'checkbox', name: 'published', aria: {
|
227
|
+
invalid: @post.errors[:published].any?,
|
228
|
+
labelledby: ['published_context', 'published_label'],
|
229
|
+
describedby: { published_errors: @post.errors[:published].any? }
|
230
|
+
}
|
231
|
+
#=> <input
|
232
|
+
type="checkbox" name="published" aria-invalid="true"
|
233
|
+
aria-labelledby="published_context published_label"
|
234
|
+
aria-describedby="published_errors"
|
235
|
+
>
|
181
236
|
|
182
|
-
|
183
|
-
the view paths have changed. Applications which have implemented custom
|
184
|
-
`ActionView::Resolver` subclasses may need to add their own cache clearing.
|
237
|
+
*Sean Doyle*
|
185
238
|
|
186
|
-
|
239
|
+
* Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
|
187
240
|
|
188
|
-
*
|
241
|
+
*Rafael Mendonça França*
|
189
242
|
|
190
|
-
|
243
|
+
* Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
|
191
244
|
|
192
|
-
*
|
193
|
-
without using any handlers, using the new `Template::RawFile` class.
|
245
|
+
*Rafael Mendonça França*
|
194
246
|
|
195
|
-
|
247
|
+
* Remove deprecated `formats` from `ActionView::Template::HTML`.
|
196
248
|
|
249
|
+
*Rafael Mendonça França*
|
197
250
|
|
198
|
-
|
251
|
+
* Remove deprecated `formats` from `ActionView::Template::RawFile`.
|
199
252
|
|
200
|
-
*
|
253
|
+
*Rafael Mendonça França*
|
201
254
|
|
202
|
-
|
203
|
-
arbitrary files on the target server or to perform a denial of service
|
204
|
-
attack.
|
255
|
+
* Remove deprecated `formats` from `ActionView::Template::Text`.
|
205
256
|
|
206
|
-
|
207
|
-
Fixes CVE-2019-5419
|
257
|
+
*Rafael Mendonça França*
|
208
258
|
|
209
|
-
|
259
|
+
* Remove deprecated `find_file` from `ActionView::PathSet`.
|
210
260
|
|
261
|
+
*Rafael Mendonça França*
|
211
262
|
|
212
|
-
|
263
|
+
* Remove deprecated `rendered_format` from `ActionView::LookupContext`.
|
213
264
|
|
214
|
-
*
|
215
|
-
no replacement.
|
265
|
+
*Rafael Mendonça França*
|
216
266
|
|
217
|
-
|
267
|
+
* Remove deprecated `find_file` from `ActionView::ViewPaths`.
|
218
268
|
|
219
|
-
*
|
220
|
-
no replacement.
|
269
|
+
*Rafael Mendonça França*
|
221
270
|
|
222
|
-
|
271
|
+
* Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
|
223
272
|
|
224
|
-
*
|
273
|
+
*Rafael Mendonça França*
|
225
274
|
|
226
|
-
|
275
|
+
* Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
|
276
|
+
in `ActionView::Base#initialize`.
|
227
277
|
|
228
|
-
*
|
278
|
+
*Rafael Mendonça França*
|
229
279
|
|
230
|
-
*
|
231
|
-
now accept two parameters, the view object and the source for the view object.
|
280
|
+
* Remove deprecated `format` argument `ActionView::Base#initialize`.
|
232
281
|
|
233
|
-
*
|
282
|
+
*Rafael Mendonça França*
|
234
283
|
|
284
|
+
* Remove deprecated `ActionView::Template#refresh`.
|
235
285
|
|
236
|
-
|
286
|
+
*Rafael Mendonça França*
|
237
287
|
|
238
|
-
*
|
239
|
-
[`rails-ujs`](https://www.npmjs.com/package/rails-ujs) to
|
240
|
-
[`@rails/ujs`](https://www.npmjs.com/package/@rails/ujs).
|
288
|
+
* Remove deprecated `ActionView::Template#original_encoding`.
|
241
289
|
|
242
|
-
*
|
290
|
+
*Rafael Mendonça França*
|
243
291
|
|
244
|
-
* Remove deprecated `
|
292
|
+
* Remove deprecated `ActionView::Template#variants`.
|
245
293
|
|
246
294
|
*Rafael Mendonça França*
|
247
295
|
|
248
|
-
*
|
249
|
-
`ActionView::Base` subclasses. This prevents the use of forms and buttons.
|
296
|
+
* Remove deprecated `ActionView::Template#formats`.
|
250
297
|
|
251
|
-
*
|
252
|
-
|
253
|
-
* Fix UJS permanently showing disabled text in a[data-remote][data-disable-with] elements within forms.
|
298
|
+
*Rafael Mendonça França*
|
254
299
|
|
255
|
-
|
300
|
+
* Remove deprecated `ActionView::Template#virtual_path=`.
|
256
301
|
|
257
|
-
*
|
302
|
+
*Rafael Mendonça França*
|
258
303
|
|
259
|
-
*
|
260
|
-
Firefox fires click events even if the click was triggered by non-primary mouse keys such as right- or scroll-wheel-clicks.
|
261
|
-
For example, right-clicking a link such as the one described below (with an underlying ajax request registered on click) should not cause that request to occur.
|
304
|
+
* Remove deprecated `ActionView::Template#updated_at`.
|
262
305
|
|
263
|
-
|
264
|
-
<%= link_to 'Remote', remote_path, class: 'remote', remote: true, data: { type: :json } %>
|
265
|
-
```
|
306
|
+
*Rafael Mendonça França*
|
266
307
|
|
267
|
-
|
308
|
+
* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
|
268
309
|
|
269
|
-
*
|
310
|
+
*Rafael Mendonça França*
|
270
311
|
|
271
|
-
*
|
312
|
+
* Make `locals` argument required on `ActionView::Template#initialize`.
|
272
313
|
|
273
|
-
|
314
|
+
*Rafael Mendonça França*
|
274
315
|
|
275
|
-
|
276
|
-
This is a paragraph with an initial indent,
|
277
|
-
followed by additional lines that are not indented,
|
278
|
-
and finally terminated with a blockquote:
|
279
|
-
"A pithy saying"
|
280
|
-
```
|
316
|
+
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
281
317
|
|
282
|
-
|
318
|
+
*Rafael Mendonça França*
|
283
319
|
|
284
|
-
|
320
|
+
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
285
321
|
|
286
|
-
*
|
322
|
+
*Rafael Mendonça França*
|
287
323
|
|
288
|
-
*
|
324
|
+
* Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
|
289
325
|
|
290
|
-
|
326
|
+
*Rafael Mendonça França*
|
291
327
|
|
292
|
-
|
293
|
-
Rendered posts/_form.html.erb (Duration: 7.1ms | Allocations: 6004)
|
294
|
-
Rendered posts/new.html.erb within layouts/application (Duration: 8.3ms | Allocations: 6654)
|
295
|
-
Completed 200 OK in 858ms (Views: 848.4ms | ActiveRecord: 0.4ms | Allocations: 1539564)
|
296
|
-
```
|
328
|
+
* Remove deprecated support to passing absolute paths to `render template:`.
|
297
329
|
|
298
|
-
*
|
330
|
+
*Rafael Mendonça França*
|
299
331
|
|
300
|
-
*
|
332
|
+
* Remove deprecated support to passing relative paths to `render file:`.
|
301
333
|
|
302
|
-
|
334
|
+
*Rafael Mendonça França*
|
303
335
|
|
304
|
-
|
336
|
+
* Remove support to template handlers that don't accept two arguments.
|
305
337
|
|
306
|
-
*
|
338
|
+
*Rafael Mendonça França*
|
307
339
|
|
308
|
-
|
309
|
-
and `collection_select` it is possible to call private methods from
|
310
|
-
the objects used.
|
340
|
+
* Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
|
311
341
|
|
312
|
-
|
342
|
+
*Rafael Mendonça França*
|
313
343
|
|
314
|
-
|
344
|
+
* Remove deprecated support to call private methods from object in some view helpers.
|
315
345
|
|
316
|
-
*
|
346
|
+
*Rafael Mendonça França*
|
317
347
|
|
318
|
-
|
319
|
-
|
320
|
-
`to_form_params` was comparing the given symbol and string keys.
|
348
|
+
* `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
|
349
|
+
the translated text and the fully resolved translation key:
|
321
350
|
|
322
|
-
|
323
|
-
|
351
|
+
<%= translate(".relative_key") do |translation, resolved_key| %>
|
352
|
+
<span title="<%= resolved_key %>"><%= translation %></span>
|
353
|
+
<% end %>
|
324
354
|
|
325
|
-
*
|
355
|
+
*Sean Doyle*
|
326
356
|
|
327
|
-
*
|
357
|
+
* Ensure cache fragment digests include all relevant template dependencies when
|
358
|
+
fragments are contained in a block passed to the render helper. Remove the
|
359
|
+
virtual_path keyword arguments found in CacheHelper as they no longer possess
|
360
|
+
any function following 1581cab.
|
328
361
|
|
329
|
-
|
362
|
+
Fixes #38984.
|
330
363
|
|
331
|
-
|
332
|
-
foo_html:
|
333
|
-
- "One"
|
334
|
-
- "<strong>Two</strong>"
|
335
|
-
- "Three 👋 🙂"
|
364
|
+
*Aaron Lipman*
|
336
365
|
|
337
|
-
|
366
|
+
* Deprecate `config.action_view.raise_on_missing_translations` in favor of
|
367
|
+
`config.i18n.raise_on_missing_translations`.
|
338
368
|
|
339
|
-
|
340
|
-
|
369
|
+
New generalized configuration option now determines whether an error should be raised
|
370
|
+
for missing translations in controllers and views.
|
341
371
|
|
342
|
-
|
372
|
+
*fatkodima*
|
343
373
|
|
344
|
-
|
374
|
+
* Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
|
375
|
+
and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
|
345
376
|
|
346
|
-
|
377
|
+
*Zach Kemp*
|
347
378
|
|
348
|
-
|
349
|
-
<option value="1998">Heisei 10</option>
|
350
|
-
<option value="1999">Heisei 11</option>
|
351
|
-
<option value="2000">Heisei 12</option>
|
352
|
-
</select>
|
353
|
-
/* The rest is omitted */
|
379
|
+
* `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
|
354
380
|
|
355
|
-
*
|
381
|
+
*Joel Hawksley*, *Aaron Patterson*
|
356
382
|
|
357
|
-
*
|
358
|
-
|
383
|
+
* `ActionView::Helpers::TranslationHelper#translate` returns nil when
|
384
|
+
passed `default: nil` without a translation matching `I18n#translate`.
|
359
385
|
|
360
|
-
|
386
|
+
*Stefan Wrobel*
|
361
387
|
|
362
|
-
|
388
|
+
* `OptimizedFileSystemResolver` prefers template details in order of locale,
|
389
|
+
formats, variants, handlers.
|
363
390
|
|
364
|
-
*
|
365
|
-
support automatic nonce generation for Content Security Policy.
|
366
|
-
Works the same way as `javascript_tag nonce: true` does.
|
391
|
+
*Iago Pimenta*
|
367
392
|
|
368
|
-
|
393
|
+
* Added `class_names` helper to create a CSS class value with conditional classes.
|
369
394
|
|
370
|
-
*
|
395
|
+
*Joel Hawksley*, *Aaron Patterson*
|
371
396
|
|
372
|
-
|
397
|
+
* Add support for conditional values to TagBuilder.
|
373
398
|
|
374
|
-
*
|
399
|
+
*Joel Hawksley*
|
375
400
|
|
376
|
-
|
377
|
-
Add a configuration option,
|
378
|
-
`action_view.finalize_compiled_template_methods`, and turn it off in
|
379
|
-
the test environment.
|
401
|
+
* `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
|
380
402
|
|
381
|
-
|
403
|
+
```ruby
|
404
|
+
@post = Post.new
|
405
|
+
@post.category = nil
|
382
406
|
|
383
|
-
|
407
|
+
# Before
|
408
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
409
|
+
# =>
|
410
|
+
# <select name="post[category]" id="post_category">
|
411
|
+
# <option value="">none</option>
|
412
|
+
# <option value="1">programming</option>
|
413
|
+
# <option value="2">economics</option>
|
414
|
+
# </select>
|
384
415
|
|
385
|
-
|
416
|
+
# After
|
417
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
418
|
+
# =>
|
419
|
+
# <select name="post[category]" id="post_category">
|
420
|
+
# <option selected="selected" value="">none</option>
|
421
|
+
# <option value="1">programming</option>
|
422
|
+
# <option value="2">economics</option>
|
423
|
+
# </select>
|
424
|
+
```
|
386
425
|
|
387
|
-
|
388
|
-
return (my_bootstrap_modal_confirm(message));
|
389
|
-
}
|
426
|
+
*bogdanvlviv*
|
390
427
|
|
391
|
-
|
428
|
+
* Log lines for partial renders and started template renders are now
|
429
|
+
emitted at the `DEBUG` level instead of `INFO`.
|
392
430
|
|
393
|
-
|
394
|
-
field.
|
431
|
+
Completed template renders are still logged at the `INFO` level.
|
395
432
|
|
396
|
-
|
433
|
+
*DHH*
|
397
434
|
|
398
|
-
|
399
|
-
:category,
|
400
|
-
["lifestyle", "programming", "spiritual"],
|
401
|
-
{ selected: "", disabled: "", prompt: "Choose one" },
|
402
|
-
{ required: true }
|
435
|
+
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
403
436
|
|
404
|
-
|
437
|
+
*Juanito Fatas*
|
405
438
|
|
406
|
-
|
439
|
+
* Added `phone_to` helper method to create a link from mobile numbers.
|
407
440
|
|
408
|
-
|
409
|
-
<option disabled="disabled" selected="selected" value="">Choose one</option>
|
410
|
-
<option value="lifestyle">lifestyle</option>
|
411
|
-
<option value="programming">programming</option>
|
412
|
-
<option value="spiritual">spiritual</option></select>
|
441
|
+
*Pietro Moro*
|
413
442
|
|
414
|
-
|
443
|
+
* annotated_source_code returns an empty array so TemplateErrors without a
|
444
|
+
template in the backtrace are surfaced properly by DebugExceptions.
|
415
445
|
|
416
|
-
*
|
446
|
+
*Guilherme Mansur*, *Kasper Timm Hansen*
|
417
447
|
|
418
|
-
|
419
|
-
IE8 or lower becomes increasingly difficult so default to not enforcing
|
420
|
-
UTF-8 encoding as it's not relevant to other browsers.
|
448
|
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
421
449
|
|
422
|
-
*
|
450
|
+
*Guilherme Mansur*, *Gannon McGibbon*
|
423
451
|
|
424
|
-
*
|
452
|
+
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
|
425
453
|
|
426
|
-
*
|
454
|
+
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
427
455
|
|
428
|
-
*
|
456
|
+
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
429
457
|
|
430
|
-
*
|
458
|
+
*Younes SERRAJ*
|
431
459
|
|
432
460
|
|
433
|
-
Please check [
|
461
|
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.
|