actionview 4.2.11.1 → 6.1.5.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 +243 -186
- data/MIT-LICENSE +1 -2
- data/README.rdoc +9 -8
- data/lib/action_view/base.rb +115 -39
- data/lib/action_view/buffers.rb +18 -1
- data/lib/action_view/cache_expiry.rb +52 -0
- data/lib/action_view/context.rb +8 -12
- data/lib/action_view/dependency_tracker.rb +61 -21
- data/lib/action_view/digestor.rb +89 -85
- data/lib/action_view/flows.rb +11 -12
- data/lib/action_view/gem_version.rb +5 -3
- data/lib/action_view/helpers/active_model_helper.rb +16 -11
- data/lib/action_view/helpers/asset_tag_helper.rb +282 -83
- data/lib/action_view/helpers/asset_url_helper.rb +175 -69
- data/lib/action_view/helpers/atom_feed_helper.rb +20 -17
- data/lib/action_view/helpers/cache_helper.rb +107 -43
- data/lib/action_view/helpers/capture_helper.rb +20 -13
- data/lib/action_view/helpers/controller_helper.rb +15 -4
- data/lib/action_view/helpers/csp_helper.rb +26 -0
- data/lib/action_view/helpers/csrf_helper.rb +8 -6
- data/lib/action_view/helpers/date_helper.rb +232 -130
- data/lib/action_view/helpers/debug_helper.rb +7 -6
- data/lib/action_view/helpers/form_helper.rb +808 -146
- data/lib/action_view/helpers/form_options_helper.rb +124 -78
- data/lib/action_view/helpers/form_tag_helper.rb +120 -74
- data/lib/action_view/helpers/javascript_helper.rb +33 -17
- data/lib/action_view/helpers/number_helper.rb +87 -62
- data/lib/action_view/helpers/output_safety_helper.rb +36 -4
- data/lib/action_view/helpers/rendering_helper.rb +21 -10
- data/lib/action_view/helpers/sanitize_helper.rb +30 -31
- data/lib/action_view/helpers/tag_helper.rb +302 -69
- data/lib/action_view/helpers/tags/base.rb +141 -97
- data/lib/action_view/helpers/tags/check_box.rb +20 -19
- data/lib/action_view/helpers/tags/checkable.rb +4 -2
- data/lib/action_view/helpers/tags/collection_check_boxes.rb +12 -34
- data/lib/action_view/helpers/tags/collection_helpers.rb +69 -36
- data/lib/action_view/helpers/tags/collection_radio_buttons.rb +6 -12
- data/lib/action_view/helpers/tags/collection_select.rb +4 -2
- data/lib/action_view/helpers/tags/color_field.rb +4 -3
- data/lib/action_view/helpers/tags/date_field.rb +3 -2
- data/lib/action_view/helpers/tags/date_select.rb +38 -37
- data/lib/action_view/helpers/tags/datetime_field.rb +4 -3
- data/lib/action_view/helpers/tags/datetime_local_field.rb +3 -2
- data/lib/action_view/helpers/tags/datetime_select.rb +2 -0
- data/lib/action_view/helpers/tags/email_field.rb +2 -0
- data/lib/action_view/helpers/tags/file_field.rb +2 -0
- data/lib/action_view/helpers/tags/grouped_collection_select.rb +4 -2
- data/lib/action_view/helpers/tags/hidden_field.rb +6 -0
- data/lib/action_view/helpers/tags/label.rb +7 -2
- data/lib/action_view/helpers/tags/month_field.rb +3 -2
- data/lib/action_view/helpers/tags/number_field.rb +2 -0
- data/lib/action_view/helpers/tags/password_field.rb +3 -1
- data/lib/action_view/helpers/tags/placeholderable.rb +3 -1
- data/lib/action_view/helpers/tags/radio_button.rb +7 -6
- data/lib/action_view/helpers/tags/range_field.rb +2 -0
- data/lib/action_view/helpers/tags/search_field.rb +14 -9
- data/lib/action_view/helpers/tags/select.rb +11 -10
- data/lib/action_view/helpers/tags/tel_field.rb +2 -0
- data/lib/action_view/helpers/tags/text_area.rb +4 -2
- data/lib/action_view/helpers/tags/text_field.rb +8 -8
- data/lib/action_view/helpers/tags/time_field.rb +3 -2
- data/lib/action_view/helpers/tags/time_select.rb +2 -0
- data/lib/action_view/helpers/tags/time_zone_select.rb +3 -1
- data/lib/action_view/helpers/tags/translator.rb +15 -16
- data/lib/action_view/helpers/tags/url_field.rb +2 -0
- data/lib/action_view/helpers/tags/week_field.rb +3 -2
- data/lib/action_view/helpers/tags.rb +3 -1
- data/lib/action_view/helpers/text_helper.rb +56 -38
- data/lib/action_view/helpers/translation_helper.rb +150 -68
- data/lib/action_view/helpers/url_helper.rb +284 -117
- data/lib/action_view/helpers.rb +5 -3
- data/lib/action_view/layouts.rb +68 -63
- data/lib/action_view/log_subscriber.rb +77 -10
- data/lib/action_view/lookup_context.rb +134 -91
- data/lib/action_view/model_naming.rb +3 -1
- data/lib/action_view/path_set.rb +26 -24
- data/lib/action_view/railtie.rb +62 -13
- data/lib/action_view/record_identifier.rb +53 -26
- data/lib/action_view/renderer/abstract_renderer.rb +151 -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 +102 -0
- data/lib/action_view/renderer/partial_renderer.rb +55 -303
- data/lib/action_view/renderer/renderer.rb +66 -9
- data/lib/action_view/renderer/streaming_template_renderer.rb +58 -54
- data/lib/action_view/renderer/template_renderer.rb +82 -73
- data/lib/action_view/rendering.rb +71 -45
- data/lib/action_view/routing_url_for.rb +34 -23
- data/lib/action_view/tasks/cache_digests.rake +25 -0
- data/lib/action_view/template/error.rb +44 -29
- data/lib/action_view/template/handlers/builder.rb +12 -13
- data/lib/action_view/template/handlers/erb/erubi.rb +89 -0
- data/lib/action_view/template/handlers/erb.rb +23 -89
- data/lib/action_view/template/handlers/html.rb +11 -0
- data/lib/action_view/template/handlers/raw.rb +4 -4
- data/lib/action_view/template/handlers.rb +12 -8
- data/lib/action_view/template/html.rb +10 -11
- 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 +263 -197
- 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 +8 -10
- data/lib/action_view/template/types.rb +18 -18
- data/lib/action_view/template.rb +108 -92
- data/lib/action_view/test_case.rb +66 -53
- data/lib/action_view/testing/resolvers.rb +24 -33
- data/lib/action_view/unbound_template.rb +31 -0
- data/lib/action_view/version.rb +3 -1
- data/lib/action_view/view_paths.rb +73 -58
- data/lib/action_view.rb +14 -8
- data/lib/assets/compiled/rails-ujs.js +746 -0
- metadata +45 -32
- data/lib/action_view/helpers/record_tag_helper.rb +0 -108
- data/lib/action_view/tasks/dependencies.rake +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 347465d701c1688d4e91d033d1f29b16f6f284005f9aaeefc71a36ef0ff439a8
|
4
|
+
data.tar.gz: de5710a75c9b8aa8bcf02e34bb62efc0818f9069c71600a8b50cedf31c0ed94f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbe1e77c8db14198627aafa50b6e8438446828ddf6ecfed37732fb2cc72db2ff03a344a8bee860677a98eb2d6d85875b626b7119e92ac20884631547e7957309
|
7
|
+
data.tar.gz: 890f5eb3fa70152816e5397b39745836ad36efe145eeff80df744dfc09878abbaa3707472eeb53025049dc3ab4e02e0766668ea56cd658f001f9a3f4a3b8514b
|
data/CHANGELOG.md
CHANGED
@@ -1,357 +1,414 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 6.1.5.1 (April 26, 2022) ##
|
2
|
+
|
3
|
+
* Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
|
4
|
+
|
5
|
+
Escape dangerous characters in names of tags and names of attributes in the
|
6
|
+
tag helpers, following the XML specification. Rename the option
|
7
|
+
`:escape_attributes` to `:escape`, to simplify by applying the option to the
|
8
|
+
whole tag.
|
9
|
+
|
10
|
+
*Álvaro Martín Fraguas*
|
11
|
+
|
12
|
+
## Rails 6.1.5 (March 09, 2022) ##
|
13
|
+
|
14
|
+
* `preload_link_tag` properly inserts `as` attributes for files with `image` MIME
|
15
|
+
types, such as JPG or SVG.
|
16
|
+
|
17
|
+
*Nate Berkopec*
|
18
|
+
|
19
|
+
* Add `autocomplete="off"` to all generated hidden fields.
|
20
|
+
|
21
|
+
Fixes #42610.
|
22
|
+
|
23
|
+
*Ryan Baumann*
|
24
|
+
|
25
|
+
* Fix `current_page?` when URL has trailing slash.
|
26
|
+
|
27
|
+
This fixes the `current_page?` helper when the given URL has a trailing slash,
|
28
|
+
and is an absolute URL or also has query params.
|
29
|
+
|
30
|
+
Fixes #33956.
|
31
|
+
|
32
|
+
*Jonathan Hefner*
|
33
|
+
|
34
|
+
|
35
|
+
## Rails 6.1.4.7 (March 08, 2022) ##
|
2
36
|
|
3
37
|
* No changes.
|
4
38
|
|
5
39
|
|
6
|
-
## Rails 4.
|
40
|
+
## Rails 6.1.4.6 (February 11, 2022) ##
|
7
41
|
|
8
42
|
* No changes.
|
9
43
|
|
10
44
|
|
11
|
-
## Rails 4.
|
45
|
+
## Rails 6.1.4.5 (February 11, 2022) ##
|
12
46
|
|
13
47
|
* No changes.
|
14
48
|
|
15
49
|
|
16
|
-
## Rails 4.
|
50
|
+
## Rails 6.1.4.4 (December 15, 2021) ##
|
17
51
|
|
18
52
|
* No changes.
|
19
53
|
|
20
54
|
|
21
|
-
## Rails 4.
|
55
|
+
## Rails 6.1.4.3 (December 14, 2021) ##
|
22
56
|
|
23
57
|
* No changes.
|
24
58
|
|
25
59
|
|
26
|
-
## Rails 4.2
|
60
|
+
## Rails 6.1.4.2 (December 14, 2021) ##
|
27
61
|
|
28
62
|
* No changes.
|
29
63
|
|
30
64
|
|
31
|
-
## Rails 4.
|
65
|
+
## Rails 6.1.4.1 (August 19, 2021) ##
|
32
66
|
|
33
|
-
*
|
34
|
-
attribute when assets are handled by Sprockets >=3.0.
|
67
|
+
* No changes.
|
35
68
|
|
36
|
-
*Bart de Water*
|
37
69
|
|
38
|
-
|
70
|
+
## Rails 6.1.4 (June 24, 2021) ##
|
39
71
|
|
40
|
-
|
72
|
+
* The `translate` helper now passes `default` values that aren't
|
73
|
+
translation keys through `I18n.translate` for interpolation.
|
41
74
|
|
42
|
-
*
|
75
|
+
*Jonathan Hefner*
|
43
76
|
|
44
|
-
*
|
77
|
+
* Don't attach UJS form submission handlers to Turbo forms.
|
45
78
|
|
46
|
-
|
79
|
+
*David Heinemeier Hansson*
|
47
80
|
|
48
|
-
|
81
|
+
* Allow both `current_page?(url_hash)` and `current_page?(**url_hash)` on Ruby 2.7.
|
49
82
|
|
50
|
-
*
|
51
|
-
as per the W3 spec: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
|
83
|
+
*Ryuta Kamizono*
|
52
84
|
|
53
|
-
*Christoph Geschwind*
|
54
85
|
|
86
|
+
## Rails 6.1.3.2 (May 05, 2021) ##
|
55
87
|
|
56
|
-
|
88
|
+
* No changes.
|
57
89
|
|
58
|
-
* Do not allow render with unpermitted parameter.
|
59
90
|
|
60
|
-
|
91
|
+
## Rails 6.1.3.1 (March 26, 2021) ##
|
61
92
|
|
62
|
-
|
93
|
+
* No changes.
|
63
94
|
|
64
95
|
|
65
|
-
## Rails
|
96
|
+
## Rails 6.1.3 (February 17, 2021) ##
|
66
97
|
|
67
|
-
*
|
68
|
-
method.
|
98
|
+
* No changes.
|
69
99
|
|
70
|
-
*Aaron Patterson*
|
71
100
|
|
101
|
+
## Rails 6.1.2.1 (February 10, 2021) ##
|
72
102
|
|
73
|
-
|
103
|
+
* No changes.
|
74
104
|
|
75
|
-
* Fix `mail_to` when called with `nil` as argument.
|
76
105
|
|
77
|
-
|
106
|
+
## Rails 6.1.2 (February 09, 2021) ##
|
78
107
|
|
79
|
-
*
|
108
|
+
* No changes.
|
80
109
|
|
81
|
-
*Bernerd Schaefer*
|
82
110
|
|
111
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
83
112
|
|
84
|
-
|
113
|
+
* Fix lazy translation in partial with block.
|
85
114
|
|
86
|
-
*
|
115
|
+
*Marek Kasztelnik*
|
87
116
|
|
117
|
+
* Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
|
88
118
|
|
89
|
-
|
119
|
+
*aar0nr*
|
90
120
|
|
91
|
-
*
|
92
|
-
translation is missing.
|
121
|
+
* Link preloading keep integrity hashes in the header.
|
93
122
|
|
94
|
-
|
123
|
+
*Étienne Barrié*
|
95
124
|
|
96
|
-
|
125
|
+
* Add `config.action_view.preload_links_header` to allow disabling of
|
126
|
+
the `Link` header being added by default when using `stylesheet_link_tag`
|
127
|
+
and `javascript_include_tag`.
|
97
128
|
|
98
|
-
*
|
129
|
+
*Andrew White*
|
99
130
|
|
100
|
-
|
131
|
+
* The `translate` helper now resolves `default` values when a `nil` key is
|
132
|
+
specified, instead of always returning `nil`.
|
101
133
|
|
102
|
-
*
|
134
|
+
*Jonathan Hefner*
|
103
135
|
|
104
|
-
* `translate` should accept nils as members of the `:default`
|
105
|
-
parameter without raising a translation missing error. Fixes a
|
106
|
-
regression introduced 362557e.
|
107
136
|
|
108
|
-
|
137
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
109
138
|
|
110
|
-
|
139
|
+
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
140
|
+
call safe_list_sanitizer's class method
|
111
141
|
|
112
|
-
|
113
|
-
as input when `precision: 0` is used.
|
142
|
+
Fixes #39586
|
114
143
|
|
115
|
-
|
144
|
+
*Taufiq Muhammadi*
|
116
145
|
|
117
|
-
|
146
|
+
* Change form_with to generate non-remote forms by default.
|
118
147
|
|
148
|
+
`form_with` would generate a remote form by default. This would confuse
|
149
|
+
users because they were forced to handle remote requests.
|
119
150
|
|
120
|
-
|
151
|
+
All new 6.1 applications will generate non-remote forms by default.
|
152
|
+
When upgrading a 6.0 application you can enable remote forms by default by
|
153
|
+
setting `config.action_view.form_with_generates_remote_forms` to `true`.
|
121
154
|
|
122
|
-
*
|
155
|
+
*Petrik de Heus*
|
123
156
|
|
157
|
+
* Yield translated strings to calls of `ActionView::FormBuilder#button`
|
158
|
+
when a block is given.
|
124
159
|
|
125
|
-
|
160
|
+
*Sean Doyle*
|
126
161
|
|
127
|
-
*
|
128
|
-
|
162
|
+
* Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
|
163
|
+
`#to_s` so that `form.label` calls can yield that value to their blocks.
|
129
164
|
|
130
|
-
*
|
165
|
+
*Sean Doyle*
|
131
166
|
|
132
|
-
*
|
133
|
-
|
167
|
+
* Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
|
168
|
+
and make the original available as an alias.
|
134
169
|
|
135
|
-
|
170
|
+
token_list("foo", "foo bar")
|
171
|
+
# => "foo bar"
|
136
172
|
|
173
|
+
*Sean Doyle*
|
137
174
|
|
138
|
-
|
175
|
+
* ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
|
176
|
+
values. This is useful when declaring lists of label text identifiers in
|
177
|
+
`aria-labelledby` or `aria-describedby`.
|
139
178
|
|
140
|
-
|
141
|
-
|
179
|
+
tag.input type: 'checkbox', name: 'published', aria: {
|
180
|
+
invalid: @post.errors[:published].any?,
|
181
|
+
labelledby: ['published_context', 'published_label'],
|
182
|
+
describedby: { published_errors: @post.errors[:published].any? }
|
183
|
+
}
|
184
|
+
#=> <input
|
185
|
+
type="checkbox" name="published" aria-invalid="true"
|
186
|
+
aria-labelledby="published_context published_label"
|
187
|
+
aria-describedby="published_errors"
|
188
|
+
>
|
142
189
|
|
143
|
-
|
190
|
+
*Sean Doyle*
|
144
191
|
|
145
|
-
|
192
|
+
* Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
|
146
193
|
|
147
|
-
*
|
194
|
+
*Rafael Mendonça França*
|
148
195
|
|
149
|
-
|
150
|
-
users to skip the insertion of the UTF8 enforcer tag in a form.
|
196
|
+
* Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
|
151
197
|
|
152
|
-
*
|
198
|
+
*Rafael Mendonça França*
|
153
199
|
|
154
|
-
*
|
155
|
-
as Ruby block calls.
|
200
|
+
* Remove deprecated `formats` from `ActionView::Template::HTML`.
|
156
201
|
|
157
|
-
*
|
202
|
+
*Rafael Mendonça França*
|
158
203
|
|
159
|
-
*
|
204
|
+
* Remove deprecated `formats` from `ActionView::Template::RawFile`.
|
160
205
|
|
161
|
-
|
206
|
+
*Rafael Mendonça França*
|
162
207
|
|
163
|
-
|
208
|
+
* Remove deprecated `formats` from `ActionView::Template::Text`.
|
164
209
|
|
165
|
-
*
|
210
|
+
*Rafael Mendonça França*
|
166
211
|
|
167
|
-
|
168
|
-
to `render file: "foo/bar"`. In Rails 4.2, this has been changed to mean
|
169
|
-
`render template: "foo/bar"` instead. If you need to render a file, please
|
170
|
-
change your code to use the explicit form (`render file: "foo/bar"`) instead.
|
212
|
+
* Remove deprecated `find_file` from `ActionView::PathSet`.
|
171
213
|
|
172
|
-
*
|
214
|
+
*Rafael Mendonça França*
|
173
215
|
|
174
|
-
*
|
216
|
+
* Remove deprecated `rendered_format` from `ActionView::LookupContext`.
|
175
217
|
|
176
|
-
|
218
|
+
*Rafael Mendonça França*
|
177
219
|
|
178
|
-
|
220
|
+
* Remove deprecated `find_file` from `ActionView::ViewPaths`.
|
179
221
|
|
180
|
-
|
222
|
+
*Rafael Mendonça França*
|
181
223
|
|
182
|
-
|
224
|
+
* Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
|
183
225
|
|
184
|
-
*
|
226
|
+
*Rafael Mendonça França*
|
185
227
|
|
186
|
-
*
|
228
|
+
* Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
|
229
|
+
in `ActionView::Base#initialize`.
|
187
230
|
|
188
|
-
|
189
|
-
when you want to customize how a particular label is presented.
|
231
|
+
*Rafael Mendonça França*
|
190
232
|
|
191
|
-
|
233
|
+
* Remove deprecated `format` argument `ActionView::Base#initialize`.
|
192
234
|
|
193
|
-
*
|
235
|
+
*Rafael Mendonça França*
|
194
236
|
|
195
|
-
|
237
|
+
* Remove deprecated `ActionView::Template#refresh`.
|
196
238
|
|
197
|
-
*
|
239
|
+
*Rafael Mendonça França*
|
198
240
|
|
199
|
-
*
|
241
|
+
* Remove deprecated `ActionView::Template#original_encoding`.
|
200
242
|
|
201
|
-
*
|
243
|
+
*Rafael Mendonça França*
|
202
244
|
|
203
|
-
*
|
245
|
+
* Remove deprecated `ActionView::Template#variants`.
|
204
246
|
|
205
|
-
|
206
|
-
`#{template_name}_iteration` when rendering partials with collections.
|
247
|
+
*Rafael Mendonça França*
|
207
248
|
|
208
|
-
|
209
|
-
the current `index` and two convenience methods `first?` and `last?`.
|
249
|
+
* Remove deprecated `ActionView::Template#formats`.
|
210
250
|
|
211
|
-
*
|
251
|
+
*Rafael Mendonça França*
|
212
252
|
|
213
|
-
*
|
214
|
-
of the `asset_host` proc returning nil.
|
253
|
+
* Remove deprecated `ActionView::Template#virtual_path=`.
|
215
254
|
|
216
|
-
*
|
255
|
+
*Rafael Mendonça França*
|
217
256
|
|
218
|
-
*
|
257
|
+
* Remove deprecated `ActionView::Template#updated_at`.
|
219
258
|
|
220
|
-
*
|
259
|
+
*Rafael Mendonça França*
|
221
260
|
|
222
|
-
*
|
261
|
+
* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
|
223
262
|
|
224
|
-
*
|
263
|
+
*Rafael Mendonça França*
|
225
264
|
|
226
|
-
*
|
227
|
-
option.
|
265
|
+
* Make `locals` argument required on `ActionView::Template#initialize`.
|
228
266
|
|
229
|
-
*
|
267
|
+
*Rafael Mendonça França*
|
230
268
|
|
231
|
-
*
|
269
|
+
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
232
270
|
|
233
|
-
*
|
271
|
+
*Rafael Mendonça França*
|
234
272
|
|
235
|
-
*
|
236
|
-
`Array#join`.
|
273
|
+
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
237
274
|
|
238
|
-
*
|
275
|
+
*Rafael Mendonça França*
|
239
276
|
|
240
|
-
*
|
241
|
-
values.
|
277
|
+
* Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
|
242
278
|
|
243
|
-
*
|
279
|
+
*Rafael Mendonça França*
|
244
280
|
|
245
|
-
*
|
281
|
+
* Remove deprecated support to passing absolute paths to `render template:`.
|
246
282
|
|
247
|
-
|
283
|
+
*Rafael Mendonça França*
|
248
284
|
|
249
|
-
|
285
|
+
* Remove deprecated support to passing relative paths to `render file:`.
|
250
286
|
|
251
|
-
*
|
287
|
+
*Rafael Mendonça França*
|
252
288
|
|
253
|
-
|
289
|
+
* Remove support to template handlers that don't accept two arguments.
|
254
290
|
|
255
|
-
*
|
256
|
-
overwrites `config.action_controller.asset_host` for particular asset.
|
291
|
+
*Rafael Mendonça França*
|
257
292
|
|
258
|
-
|
293
|
+
* Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
|
259
294
|
|
260
|
-
*
|
261
|
-
Override `AbstractController::Base.local_prefixes` when you want to change
|
262
|
-
where to find views.
|
295
|
+
*Rafael Mendonça França*
|
263
296
|
|
264
|
-
|
297
|
+
* Remove deprecated support to call private methods from object in some view helpers.
|
265
298
|
|
266
|
-
*
|
299
|
+
*Rafael Mendonça França*
|
267
300
|
|
268
|
-
|
301
|
+
* `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
|
302
|
+
the translated text and the fully resolved translation key:
|
269
303
|
|
270
|
-
|
271
|
-
|
272
|
-
<%= f.label :type, value: "long" %>
|
304
|
+
<%= translate(".relative_key") do |translation, resolved_key| %>
|
305
|
+
<span title="<%= resolved_key %>"><%= translation %></span>
|
273
306
|
<% end %>
|
274
307
|
|
275
|
-
|
276
|
-
en:
|
277
|
-
activerecord:
|
278
|
-
attributes:
|
279
|
-
post/long: "Long-form Post"
|
308
|
+
*Sean Doyle*
|
280
309
|
|
281
|
-
|
282
|
-
|
310
|
+
* Ensure cache fragment digests include all relevant template dependencies when
|
311
|
+
fragments are contained in a block passed to the render helper. Remove the
|
312
|
+
virtual_path keyword arguments found in CacheHelper as they no longer possess
|
313
|
+
any function following 1581cab.
|
283
314
|
|
284
|
-
|
315
|
+
Fixes #38984.
|
285
316
|
|
286
|
-
*
|
317
|
+
*Aaron Lipman*
|
287
318
|
|
288
|
-
|
319
|
+
* Deprecate `config.action_view.raise_on_missing_translations` in favor of
|
320
|
+
`config.i18n.raise_on_missing_translations`.
|
289
321
|
|
290
|
-
|
322
|
+
New generalized configuration option now determines whether an error should be raised
|
323
|
+
for missing translations in controllers and views.
|
291
324
|
|
292
|
-
|
325
|
+
*fatkodima*
|
293
326
|
|
294
|
-
|
327
|
+
* Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
|
328
|
+
and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
|
295
329
|
|
296
|
-
*
|
330
|
+
*Zach Kemp*
|
297
331
|
|
298
|
-
*
|
299
|
-
`image/x-icon`.
|
332
|
+
* `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
|
300
333
|
|
301
|
-
|
334
|
+
*Joel Hawksley*, *Aaron Patterson*
|
302
335
|
|
303
|
-
|
304
|
-
|
336
|
+
* `ActionView::Helpers::TranslationHelper#translate` returns nil when
|
337
|
+
passed `default: nil` without a translation matching `I18n#translate`.
|
305
338
|
|
306
|
-
|
339
|
+
*Stefan Wrobel*
|
307
340
|
|
308
|
-
|
309
|
-
|
341
|
+
* `OptimizedFileSystemResolver` prefers template details in order of locale,
|
342
|
+
formats, variants, handlers.
|
310
343
|
|
311
|
-
*
|
344
|
+
*Iago Pimenta*
|
312
345
|
|
313
|
-
*
|
346
|
+
* Added `class_names` helper to create a CSS class value with conditional classes.
|
314
347
|
|
315
|
-
|
316
|
-
inside a form are valid HTML5, and the absence of inline styles help in validating
|
317
|
-
for Content Security Policy.
|
348
|
+
*Joel Hawksley*, *Aaron Patterson*
|
318
349
|
|
319
|
-
|
350
|
+
* Add support for conditional values to TagBuilder.
|
320
351
|
|
321
|
-
*
|
352
|
+
*Joel Hawksley*
|
322
353
|
|
323
|
-
|
354
|
+
* `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
|
324
355
|
|
325
|
-
|
356
|
+
```ruby
|
357
|
+
@post = Post.new
|
358
|
+
@post.category = nil
|
359
|
+
|
360
|
+
# Before
|
361
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
362
|
+
# =>
|
363
|
+
# <select name="post[category]" id="post_category">
|
364
|
+
# <option value="">none</option>
|
365
|
+
# <option value="1">programming</option>
|
366
|
+
# <option value="2">economics</option>
|
367
|
+
# </select>
|
368
|
+
|
369
|
+
# After
|
370
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
371
|
+
# =>
|
372
|
+
# <select name="post[category]" id="post_category">
|
373
|
+
# <option selected="selected" value="">none</option>
|
374
|
+
# <option value="1">programming</option>
|
375
|
+
# <option value="2">economics</option>
|
376
|
+
# </select>
|
377
|
+
```
|
378
|
+
|
379
|
+
*bogdanvlviv*
|
380
|
+
|
381
|
+
* Log lines for partial renders and started template renders are now
|
382
|
+
emitted at the `DEBUG` level instead of `INFO`.
|
383
|
+
|
384
|
+
Completed template renders are still logged at the `INFO` level.
|
385
|
+
|
386
|
+
*DHH*
|
326
387
|
|
327
|
-
*
|
388
|
+
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
328
389
|
|
329
|
-
*
|
390
|
+
*Juanito Fatas*
|
330
391
|
|
331
|
-
* `
|
332
|
-
as input.
|
392
|
+
* Added `phone_to` helper method to create a link from mobile numbers.
|
333
393
|
|
334
|
-
|
394
|
+
*Pietro Moro*
|
335
395
|
|
336
|
-
|
396
|
+
* annotated_source_code returns an empty array so TemplateErrors without a
|
397
|
+
template in the backtrace are surfaced properly by DebugExceptions.
|
337
398
|
|
338
|
-
*
|
399
|
+
*Guilherme Mansur*, *Kasper Timm Hansen*
|
339
400
|
|
340
|
-
|
401
|
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
341
402
|
|
342
|
-
*
|
343
|
-
applied correctly.
|
403
|
+
*Guilherme Mansur*, *Gannon McGibbon*
|
344
404
|
|
345
|
-
|
405
|
+
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
|
346
406
|
|
347
|
-
*
|
407
|
+
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
348
408
|
|
349
|
-
*
|
409
|
+
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
350
410
|
|
351
|
-
|
352
|
-
to support variants and allow more flexibility in the future. The support for
|
353
|
-
regular (required) arguments is deprecated and will be removed in Rails 5.0 or later.
|
411
|
+
*Younes SERRAJ*
|
354
412
|
|
355
|
-
*Piotr Chmolowski, Łukasz Strzałkowski*
|
356
413
|
|
357
|
-
Please check [
|
414
|
+
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
|
-
|