actionview 5.2.8.1 → 6.1.6.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionview might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +284 -112
- data/MIT-LICENSE +1 -2
- data/README.rdoc +5 -3
- data/lib/action_view/base.rb +81 -15
- data/lib/action_view/buffers.rb +15 -0
- data/lib/action_view/cache_expiry.rb +52 -0
- data/lib/action_view/context.rb +5 -9
- data/lib/action_view/dependency_tracker.rb +10 -4
- data/lib/action_view/digestor.rb +15 -22
- data/lib/action_view/flows.rb +0 -1
- data/lib/action_view/gem_version.rb +3 -3
- data/lib/action_view/helpers/active_model_helper.rb +0 -1
- data/lib/action_view/helpers/asset_tag_helper.rb +65 -48
- data/lib/action_view/helpers/asset_url_helper.rb +9 -6
- data/lib/action_view/helpers/atom_feed_helper.rb +2 -1
- data/lib/action_view/helpers/cache_helper.rb +23 -22
- data/lib/action_view/helpers/capture_helper.rb +4 -0
- data/lib/action_view/helpers/csp_helper.rb +4 -2
- data/lib/action_view/helpers/csrf_helper.rb +1 -1
- data/lib/action_view/helpers/date_helper.rb +75 -31
- data/lib/action_view/helpers/form_helper.rb +305 -37
- data/lib/action_view/helpers/form_options_helper.rb +23 -23
- data/lib/action_view/helpers/form_tag_helper.rb +21 -18
- data/lib/action_view/helpers/javascript_helper.rb +12 -11
- data/lib/action_view/helpers/number_helper.rb +14 -8
- data/lib/action_view/helpers/output_safety_helper.rb +1 -1
- data/lib/action_view/helpers/rendering_helper.rb +17 -7
- data/lib/action_view/helpers/sanitize_helper.rb +12 -18
- data/lib/action_view/helpers/tag_helper.rb +103 -26
- data/lib/action_view/helpers/tags/base.rb +19 -12
- data/lib/action_view/helpers/tags/check_box.rb +1 -2
- data/lib/action_view/helpers/tags/collection_check_boxes.rb +0 -1
- data/lib/action_view/helpers/tags/collection_helpers.rb +0 -1
- data/lib/action_view/helpers/tags/collection_radio_buttons.rb +0 -1
- data/lib/action_view/helpers/tags/color_field.rb +1 -2
- data/lib/action_view/helpers/tags/date_field.rb +1 -2
- data/lib/action_view/helpers/tags/date_select.rb +2 -3
- data/lib/action_view/helpers/tags/datetime_field.rb +0 -1
- data/lib/action_view/helpers/tags/datetime_local_field.rb +1 -2
- data/lib/action_view/helpers/tags/hidden_field.rb +4 -0
- data/lib/action_view/helpers/tags/label.rb +4 -1
- data/lib/action_view/helpers/tags/month_field.rb +1 -2
- data/lib/action_view/helpers/tags/radio_button.rb +0 -1
- data/lib/action_view/helpers/tags/select.rb +1 -2
- data/lib/action_view/helpers/tags/text_field.rb +0 -1
- data/lib/action_view/helpers/tags/time_field.rb +1 -2
- data/lib/action_view/helpers/tags/translator.rb +1 -6
- data/lib/action_view/helpers/tags/week_field.rb +1 -2
- data/lib/action_view/helpers/text_helper.rb +4 -5
- data/lib/action_view/helpers/translation_helper.rb +94 -54
- data/lib/action_view/helpers/url_helper.rb +150 -38
- data/lib/action_view/helpers.rb +0 -2
- data/lib/action_view/layouts.rb +8 -10
- data/lib/action_view/log_subscriber.rb +30 -15
- data/lib/action_view/lookup_context.rb +63 -35
- data/lib/action_view/path_set.rb +3 -12
- data/lib/action_view/railtie.rb +42 -26
- data/lib/action_view/record_identifier.rb +2 -3
- data/lib/action_view/renderer/abstract_renderer.rb +142 -11
- 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 +61 -16
- data/lib/action_view/renderer/partial_renderer.rb +21 -273
- data/lib/action_view/renderer/renderer.rb +59 -4
- data/lib/action_view/renderer/streaming_template_renderer.rb +10 -8
- data/lib/action_view/renderer/template_renderer.rb +35 -27
- data/lib/action_view/rendering.rb +54 -33
- data/lib/action_view/routing_url_for.rb +13 -12
- data/lib/action_view/template/error.rb +30 -15
- data/lib/action_view/template/handlers/builder.rb +2 -2
- data/lib/action_view/template/handlers/erb/erubi.rb +15 -9
- data/lib/action_view/template/handlers/erb.rb +16 -11
- data/lib/action_view/template/handlers/html.rb +1 -1
- data/lib/action_view/template/handlers/raw.rb +2 -2
- data/lib/action_view/template/handlers.rb +1 -1
- data/lib/action_view/template/html.rb +5 -6
- data/lib/action_view/template/inline.rb +22 -0
- data/lib/action_view/template/raw_file.rb +25 -0
- data/lib/action_view/template/renderable.rb +24 -0
- data/lib/action_view/template/resolver.rb +191 -150
- data/lib/action_view/template/sources/file.rb +17 -0
- data/lib/action_view/template/sources.rb +13 -0
- data/lib/action_view/template/text.rb +2 -3
- data/lib/action_view/template.rb +66 -75
- data/lib/action_view/test_case.rb +21 -29
- data/lib/action_view/testing/resolvers.rb +18 -27
- data/lib/action_view/unbound_template.rb +31 -0
- data/lib/action_view/view_paths.rb +59 -38
- data/lib/action_view.rb +7 -2
- data/lib/assets/compiled/rails-ujs.js +32 -6
- metadata +28 -16
- data/lib/action_view/helpers/record_tag_helper.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73ad472357d09152ca691368bebd4d9879dde000ca496201bc2d2f4781c20787
|
4
|
+
data.tar.gz: 51229bf951522f16967e4bce38848c20009713b22d753a53af7c1e61bd9e3396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3baeab0382dc8aee9f262b63b5bdb05753201f9677822c77d4282ebe8d04f42696fe697d0194b3754230c6340694cbb98d4c1f81647b7c715d3a15ffc336c682
|
7
|
+
data.tar.gz: 79a528161f47a066ca70cd9284e81cdf2a7a441623a0774d78ef1c182e40cd15b9b44c21c630a3df4bb7bf17538fc7ac055e6bb06bebf32d08bc904fe543045d
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,9 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 6.1.6.1 (July 12, 2022) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails 5.
|
7
|
-
|
8
|
-
* No changes.
|
9
|
-
|
10
|
-
|
11
|
-
## Rails 5.2.7.1 (April 26, 2022) ##
|
6
|
+
## Rails 6.1.5.1 (April 26, 2022) ##
|
12
7
|
|
13
8
|
* Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
|
14
9
|
|
@@ -19,229 +14,406 @@
|
|
19
14
|
|
20
15
|
*Álvaro Martín Fraguas*
|
21
16
|
|
17
|
+
## Rails 6.1.5 (March 09, 2022) ##
|
22
18
|
|
23
|
-
|
19
|
+
* `preload_link_tag` properly inserts `as` attributes for files with `image` MIME
|
20
|
+
types, such as JPG or SVG.
|
24
21
|
|
25
|
-
*
|
22
|
+
*Nate Berkopec*
|
23
|
+
|
24
|
+
* Add `autocomplete="off"` to all generated hidden fields.
|
25
|
+
|
26
|
+
Fixes #42610.
|
27
|
+
|
28
|
+
*Ryan Baumann*
|
26
29
|
|
30
|
+
* Fix `current_page?` when URL has trailing slash.
|
27
31
|
|
28
|
-
|
32
|
+
This fixes the `current_page?` helper when the given URL has a trailing slash,
|
33
|
+
and is an absolute URL or also has query params.
|
34
|
+
|
35
|
+
Fixes #33956.
|
36
|
+
|
37
|
+
*Jonathan Hefner*
|
38
|
+
|
39
|
+
|
40
|
+
## Rails 6.1.4.7 (March 08, 2022) ##
|
29
41
|
|
30
42
|
* No changes.
|
31
43
|
|
32
44
|
|
33
|
-
## Rails
|
45
|
+
## Rails 6.1.4.6 (February 11, 2022) ##
|
34
46
|
|
35
47
|
* No changes.
|
36
48
|
|
37
49
|
|
38
|
-
## Rails
|
50
|
+
## Rails 6.1.4.5 (February 11, 2022) ##
|
39
51
|
|
40
52
|
* No changes.
|
41
53
|
|
42
54
|
|
43
|
-
## Rails
|
55
|
+
## Rails 6.1.4.4 (December 15, 2021) ##
|
44
56
|
|
45
57
|
* No changes.
|
46
58
|
|
47
59
|
|
48
|
-
## Rails
|
60
|
+
## Rails 6.1.4.3 (December 14, 2021) ##
|
49
61
|
|
50
62
|
* No changes.
|
51
63
|
|
52
64
|
|
53
|
-
## Rails
|
65
|
+
## Rails 6.1.4.2 (December 14, 2021) ##
|
54
66
|
|
55
67
|
* No changes.
|
56
68
|
|
57
69
|
|
58
|
-
## Rails
|
70
|
+
## Rails 6.1.4.1 (August 19, 2021) ##
|
59
71
|
|
60
72
|
* No changes.
|
61
73
|
|
62
74
|
|
63
|
-
## Rails
|
75
|
+
## Rails 6.1.4 (June 24, 2021) ##
|
64
76
|
|
65
|
-
*
|
77
|
+
* The `translate` helper now passes `default` values that aren't
|
78
|
+
translation keys through `I18n.translate` for interpolation.
|
66
79
|
|
67
80
|
*Jonathan Hefner*
|
68
81
|
|
82
|
+
* Don't attach UJS form submission handlers to Turbo forms.
|
69
83
|
|
70
|
-
|
84
|
+
*David Heinemeier Hansson*
|
71
85
|
|
72
|
-
*
|
86
|
+
* Allow both `current_page?(url_hash)` and `current_page?(**url_hash)` on Ruby 2.7.
|
73
87
|
|
88
|
+
*Ryuta Kamizono*
|
74
89
|
|
75
|
-
## Rails 5.2.4.2 (March 19, 2020) ##
|
76
90
|
|
77
|
-
|
91
|
+
## Rails 6.1.3.2 (May 05, 2021) ##
|
78
92
|
|
79
|
-
|
93
|
+
* No changes.
|
80
94
|
|
81
|
-
*Aaron Patterson*
|
82
95
|
|
96
|
+
## Rails 6.1.3.1 (March 26, 2021) ##
|
83
97
|
|
84
|
-
|
98
|
+
* No changes.
|
99
|
+
|
100
|
+
|
101
|
+
## Rails 6.1.3 (February 17, 2021) ##
|
85
102
|
|
86
103
|
* No changes.
|
87
104
|
|
88
105
|
|
89
|
-
## Rails
|
106
|
+
## Rails 6.1.2.1 (February 10, 2021) ##
|
90
107
|
|
91
|
-
*
|
92
|
-
Programmatic click events (eg. ones generated by `Rails.fire(link, "click")`) don't specify a button. These events were being incorrectly stopped by code meant to ignore scroll wheel and right clicks introduced in #34573.
|
108
|
+
* No changes.
|
93
109
|
|
94
|
-
*Sudara Williams*
|
95
110
|
|
111
|
+
## Rails 6.1.2 (February 09, 2021) ##
|
96
112
|
|
97
|
-
|
113
|
+
* No changes.
|
98
114
|
|
99
|
-
* Prevent non-primary mouse keys from triggering Rails UJS click handlers.
|
100
|
-
Firefox fires click events even if the click was triggered by non-primary mouse keys such as right- or scroll-wheel-clicks.
|
101
|
-
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.
|
102
115
|
|
103
|
-
|
104
|
-
|
105
|
-
|
116
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
117
|
+
|
118
|
+
* Fix lazy translation in partial with block.
|
106
119
|
|
107
|
-
|
120
|
+
*Marek Kasztelnik*
|
108
121
|
|
109
|
-
|
122
|
+
* Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
|
110
123
|
|
124
|
+
*aar0nr*
|
111
125
|
|
112
|
-
|
126
|
+
* Link preloading keep integrity hashes in the header.
|
113
127
|
|
114
|
-
|
128
|
+
*Étienne Barrié*
|
115
129
|
|
116
|
-
|
117
|
-
|
118
|
-
|
130
|
+
* Add `config.action_view.preload_links_header` to allow disabling of
|
131
|
+
the `Link` header being added by default when using `stylesheet_link_tag`
|
132
|
+
and `javascript_include_tag`.
|
119
133
|
|
120
|
-
|
121
|
-
Fixes CVE-2019-5419
|
134
|
+
*Andrew White*
|
122
135
|
|
123
|
-
|
136
|
+
* The `translate` helper now resolves `default` values when a `nil` key is
|
137
|
+
specified, instead of always returning `nil`.
|
124
138
|
|
139
|
+
*Jonathan Hefner*
|
125
140
|
|
126
|
-
## Rails 5.2.2 (December 04, 2018) ##
|
127
141
|
|
128
|
-
|
142
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
129
143
|
|
144
|
+
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
145
|
+
call safe_list_sanitizer's class method
|
130
146
|
|
131
|
-
|
147
|
+
Fixes #39586
|
132
148
|
|
133
|
-
*
|
149
|
+
*Taufiq Muhammadi*
|
134
150
|
|
151
|
+
* Change form_with to generate non-remote forms by default.
|
135
152
|
|
136
|
-
|
153
|
+
`form_with` would generate a remote form by default. This would confuse
|
154
|
+
users because they were forced to handle remote requests.
|
137
155
|
|
138
|
-
|
139
|
-
|
156
|
+
All new 6.1 applications will generate non-remote forms by default.
|
157
|
+
When upgrading a 6.0 application you can enable remote forms by default by
|
158
|
+
setting `config.action_view.form_with_generates_remote_forms` to `true`.
|
140
159
|
|
141
|
-
*
|
160
|
+
*Petrik de Heus*
|
142
161
|
|
143
|
-
*
|
162
|
+
* Yield translated strings to calls of `ActionView::FormBuilder#button`
|
163
|
+
when a block is given.
|
144
164
|
|
145
|
-
|
146
|
-
contains symbol and string keys. The reason for the exception was that
|
147
|
-
`to_form_params` was comparing the given symbol and string keys.
|
165
|
+
*Sean Doyle*
|
148
166
|
|
149
|
-
|
150
|
-
`
|
167
|
+
* Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
|
168
|
+
`#to_s` so that `form.label` calls can yield that value to their blocks.
|
151
169
|
|
152
|
-
*
|
170
|
+
*Sean Doyle*
|
153
171
|
|
154
|
-
*
|
155
|
-
|
172
|
+
* Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
|
173
|
+
and make the original available as an alias.
|
156
174
|
|
157
|
-
|
175
|
+
token_list("foo", "foo bar")
|
176
|
+
# => "foo bar"
|
158
177
|
|
159
|
-
*
|
178
|
+
*Sean Doyle*
|
160
179
|
|
161
|
-
*
|
162
|
-
|
163
|
-
|
180
|
+
* ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
|
181
|
+
values. This is useful when declaring lists of label text identifiers in
|
182
|
+
`aria-labelledby` or `aria-describedby`.
|
164
183
|
|
165
|
-
|
184
|
+
tag.input type: 'checkbox', name: 'published', aria: {
|
185
|
+
invalid: @post.errors[:published].any?,
|
186
|
+
labelledby: ['published_context', 'published_label'],
|
187
|
+
describedby: { published_errors: @post.errors[:published].any? }
|
188
|
+
}
|
189
|
+
#=> <input
|
190
|
+
type="checkbox" name="published" aria-invalid="true"
|
191
|
+
aria-labelledby="published_context published_label"
|
192
|
+
aria-describedby="published_errors"
|
193
|
+
>
|
166
194
|
|
195
|
+
*Sean Doyle*
|
167
196
|
|
168
|
-
|
197
|
+
* Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
|
169
198
|
|
170
|
-
*
|
199
|
+
*Rafael Mendonça França*
|
171
200
|
|
172
|
-
|
201
|
+
* Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
|
173
202
|
|
174
|
-
*
|
203
|
+
*Rafael Mendonça França*
|
204
|
+
|
205
|
+
* Remove deprecated `formats` from `ActionView::Template::HTML`.
|
206
|
+
|
207
|
+
*Rafael Mendonça França*
|
208
|
+
|
209
|
+
* Remove deprecated `formats` from `ActionView::Template::RawFile`.
|
210
|
+
|
211
|
+
*Rafael Mendonça França*
|
212
|
+
|
213
|
+
* Remove deprecated `formats` from `ActionView::Template::Text`.
|
214
|
+
|
215
|
+
*Rafael Mendonça França*
|
216
|
+
|
217
|
+
* Remove deprecated `find_file` from `ActionView::PathSet`.
|
218
|
+
|
219
|
+
*Rafael Mendonça França*
|
220
|
+
|
221
|
+
* Remove deprecated `rendered_format` from `ActionView::LookupContext`.
|
222
|
+
|
223
|
+
*Rafael Mendonça França*
|
224
|
+
|
225
|
+
* Remove deprecated `find_file` from `ActionView::ViewPaths`.
|
226
|
+
|
227
|
+
*Rafael Mendonça França*
|
228
|
+
|
229
|
+
* Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
|
230
|
+
|
231
|
+
*Rafael Mendonça França*
|
232
|
+
|
233
|
+
* Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
|
234
|
+
in `ActionView::Base#initialize`.
|
235
|
+
|
236
|
+
*Rafael Mendonça França*
|
237
|
+
|
238
|
+
* Remove deprecated `format` argument `ActionView::Base#initialize`.
|
239
|
+
|
240
|
+
*Rafael Mendonça França*
|
241
|
+
|
242
|
+
* Remove deprecated `ActionView::Template#refresh`.
|
175
243
|
|
176
|
-
*
|
244
|
+
*Rafael Mendonça França*
|
177
245
|
|
178
|
-
|
179
|
-
handle method names as `group_method` and `group_label_method` parameters,
|
180
|
-
it is now able to receive procs and other callable objects too.
|
246
|
+
* Remove deprecated `ActionView::Template#original_encoding`.
|
181
247
|
|
182
|
-
*
|
248
|
+
*Rafael Mendonça França*
|
183
249
|
|
184
|
-
*
|
250
|
+
* Remove deprecated `ActionView::Template#variants`.
|
185
251
|
|
186
|
-
|
187
|
-
(different to the specified in `javascript_include_tag` and `stylesheet_link_tag`).
|
188
|
-
Additionally, this sends Early Hints if supported by browser.
|
252
|
+
*Rafael Mendonça França*
|
189
253
|
|
190
|
-
|
254
|
+
* Remove deprecated `ActionView::Template#formats`.
|
191
255
|
|
192
|
-
*
|
256
|
+
*Rafael Mendonça França*
|
193
257
|
|
194
|
-
|
195
|
-
that was enabled in `form_for`. This usually is not an good idea since labels don't work
|
196
|
-
when the input doesn't have an id and it made harder to test with Capybara.
|
258
|
+
* Remove deprecated `ActionView::Template#virtual_path=`.
|
197
259
|
|
198
|
-
|
199
|
-
to `false.`
|
260
|
+
*Rafael Mendonça França*
|
200
261
|
|
201
|
-
|
262
|
+
* Remove deprecated `ActionView::Template#updated_at`.
|
202
263
|
|
203
|
-
*
|
264
|
+
*Rafael Mendonça França*
|
204
265
|
|
205
|
-
|
266
|
+
* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
|
206
267
|
|
207
|
-
*
|
268
|
+
*Rafael Mendonça França*
|
208
269
|
|
209
|
-
*
|
270
|
+
* Make `locals` argument required on `ActionView::Template#initialize`.
|
210
271
|
|
211
272
|
*Rafael Mendonça França*
|
212
273
|
|
213
|
-
* Remove
|
274
|
+
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
275
|
+
|
276
|
+
*Rafael Mendonça França*
|
277
|
+
|
278
|
+
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
279
|
+
|
280
|
+
*Rafael Mendonça França*
|
281
|
+
|
282
|
+
* Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
|
283
|
+
|
284
|
+
*Rafael Mendonça França*
|
285
|
+
|
286
|
+
* Remove deprecated support to passing absolute paths to `render template:`.
|
287
|
+
|
288
|
+
*Rafael Mendonça França*
|
289
|
+
|
290
|
+
* Remove deprecated support to passing relative paths to `render file:`.
|
291
|
+
|
292
|
+
*Rafael Mendonça França*
|
293
|
+
|
294
|
+
* Remove support to template handlers that don't accept two arguments.
|
295
|
+
|
296
|
+
*Rafael Mendonça França*
|
297
|
+
|
298
|
+
* Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
|
299
|
+
|
300
|
+
*Rafael Mendonça França*
|
301
|
+
|
302
|
+
* Remove deprecated support to call private methods from object in some view helpers.
|
303
|
+
|
304
|
+
*Rafael Mendonça França*
|
305
|
+
|
306
|
+
* `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
|
307
|
+
the translated text and the fully resolved translation key:
|
308
|
+
|
309
|
+
<%= translate(".relative_key") do |translation, resolved_key| %>
|
310
|
+
<span title="<%= resolved_key %>"><%= translation %></span>
|
311
|
+
<% end %>
|
312
|
+
|
313
|
+
*Sean Doyle*
|
314
|
+
|
315
|
+
* Ensure cache fragment digests include all relevant template dependencies when
|
316
|
+
fragments are contained in a block passed to the render helper. Remove the
|
317
|
+
virtual_path keyword arguments found in CacheHelper as they no longer possess
|
318
|
+
any function following 1581cab.
|
319
|
+
|
320
|
+
Fixes #38984.
|
321
|
+
|
322
|
+
*Aaron Lipman*
|
323
|
+
|
324
|
+
* Deprecate `config.action_view.raise_on_missing_translations` in favor of
|
325
|
+
`config.i18n.raise_on_missing_translations`.
|
326
|
+
|
327
|
+
New generalized configuration option now determines whether an error should be raised
|
328
|
+
for missing translations in controllers and views.
|
329
|
+
|
330
|
+
*fatkodima*
|
331
|
+
|
332
|
+
* Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
|
333
|
+
and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
|
334
|
+
|
335
|
+
*Zach Kemp*
|
336
|
+
|
337
|
+
* `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
|
338
|
+
|
339
|
+
*Joel Hawksley*, *Aaron Patterson*
|
340
|
+
|
341
|
+
* `ActionView::Helpers::TranslationHelper#translate` returns nil when
|
342
|
+
passed `default: nil` without a translation matching `I18n#translate`.
|
343
|
+
|
344
|
+
*Stefan Wrobel*
|
345
|
+
|
346
|
+
* `OptimizedFileSystemResolver` prefers template details in order of locale,
|
347
|
+
formats, variants, handlers.
|
348
|
+
|
349
|
+
*Iago Pimenta*
|
350
|
+
|
351
|
+
* Added `class_names` helper to create a CSS class value with conditional classes.
|
352
|
+
|
353
|
+
*Joel Hawksley*, *Aaron Patterson*
|
354
|
+
|
355
|
+
* Add support for conditional values to TagBuilder.
|
356
|
+
|
357
|
+
*Joel Hawksley*
|
358
|
+
|
359
|
+
* `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
|
360
|
+
|
361
|
+
```ruby
|
362
|
+
@post = Post.new
|
363
|
+
@post.category = nil
|
364
|
+
|
365
|
+
# Before
|
366
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
367
|
+
# =>
|
368
|
+
# <select name="post[category]" id="post_category">
|
369
|
+
# <option value="">none</option>
|
370
|
+
# <option value="1">programming</option>
|
371
|
+
# <option value="2">economics</option>
|
372
|
+
# </select>
|
373
|
+
|
374
|
+
# After
|
375
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
376
|
+
# =>
|
377
|
+
# <select name="post[category]" id="post_category">
|
378
|
+
# <option selected="selected" value="">none</option>
|
379
|
+
# <option value="1">programming</option>
|
380
|
+
# <option value="2">economics</option>
|
381
|
+
# </select>
|
382
|
+
```
|
383
|
+
|
384
|
+
*bogdanvlviv*
|
214
385
|
|
215
|
-
|
386
|
+
* Log lines for partial renders and started template renders are now
|
387
|
+
emitted at the `DEBUG` level instead of `INFO`.
|
216
388
|
|
217
|
-
|
389
|
+
Completed template renders are still logged at the `INFO` level.
|
218
390
|
|
219
|
-
*
|
391
|
+
*DHH*
|
220
392
|
|
221
|
-
|
393
|
+
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
222
394
|
|
223
|
-
*
|
395
|
+
*Juanito Fatas*
|
224
396
|
|
225
|
-
|
397
|
+
* Added `phone_to` helper method to create a link from mobile numbers.
|
226
398
|
|
227
|
-
*
|
399
|
+
*Pietro Moro*
|
228
400
|
|
229
|
-
*
|
401
|
+
* annotated_source_code returns an empty array so TemplateErrors without a
|
402
|
+
template in the backtrace are surfaced properly by DebugExceptions.
|
230
403
|
|
231
|
-
|
404
|
+
*Guilherme Mansur*, *Kasper Timm Hansen*
|
232
405
|
|
233
|
-
|
406
|
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
234
407
|
|
235
|
-
*
|
408
|
+
*Guilherme Mansur*, *Gannon McGibbon*
|
236
409
|
|
237
|
-
*
|
410
|
+
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
|
238
411
|
|
239
|
-
*
|
412
|
+
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
240
413
|
|
241
|
-
*
|
242
|
-
for bad input.
|
414
|
+
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
243
415
|
|
244
|
-
*
|
416
|
+
*Younes SERRAJ*
|
245
417
|
|
246
418
|
|
247
|
-
Please check [
|
419
|
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2004-
|
1
|
+
Copyright (c) 2004-2022 David Heinemeier Hansson
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
a copy of this software and associated documentation files (the
|
@@ -18,4 +18,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
18
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
19
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
20
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
|
data/README.rdoc
CHANGED
@@ -5,6 +5,8 @@ view helpers that assist when building HTML forms, Atom feeds and more.
|
|
5
5
|
Template formats that Action View handles are ERB (embedded Ruby, typically
|
6
6
|
used to inline short Ruby snippets inside HTML), and XML Builder.
|
7
7
|
|
8
|
+
You can read more about Action View in the {Action View Overview}[https://edgeguides.rubyonrails.org/action_view_overview.html] guide.
|
9
|
+
|
8
10
|
== Download and installation
|
9
11
|
|
10
12
|
The latest version of Action View can be installed with RubyGems:
|
@@ -13,7 +15,7 @@ The latest version of Action View can be installed with RubyGems:
|
|
13
15
|
|
14
16
|
Source code can be downloaded as part of the Rails project on GitHub:
|
15
17
|
|
16
|
-
* https://github.com/rails/rails/tree/
|
18
|
+
* https://github.com/rails/rails/tree/main/actionview
|
17
19
|
|
18
20
|
|
19
21
|
== License
|
@@ -27,7 +29,7 @@ Action View is released under the MIT license:
|
|
27
29
|
|
28
30
|
API documentation is at
|
29
31
|
|
30
|
-
*
|
32
|
+
* https://api.rubyonrails.org
|
31
33
|
|
32
34
|
Bug reports for the Ruby on Rails project can be filed here:
|
33
35
|
|
@@ -35,4 +37,4 @@ Bug reports for the Ruby on Rails project can be filed here:
|
|
35
37
|
|
36
38
|
Feature requests should be discussed on the rails-core mailing list here:
|
37
39
|
|
38
|
-
* https://
|
40
|
+
* https://discuss.rubyonrails.org/c/rubyonrails-core
|