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