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