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