actionview 4.2.11.1 → 6.0.4
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 +201 -192
- data/MIT-LICENSE +1 -1
- data/README.rdoc +9 -8
- data/lib/action_view/base.rb +144 -37
- data/lib/action_view/buffers.rb +18 -1
- data/lib/action_view/cache_expiry.rb +53 -0
- data/lib/action_view/context.rb +8 -12
- data/lib/action_view/dependency_tracker.rb +54 -20
- data/lib/action_view/digestor.rb +88 -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 +241 -82
- data/lib/action_view/helpers/asset_url_helper.rb +171 -67
- data/lib/action_view/helpers/atom_feed_helper.rb +19 -17
- data/lib/action_view/helpers/cache_helper.rb +112 -42
- 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 +230 -129
- data/lib/action_view/helpers/debug_helper.rb +7 -6
- data/lib/action_view/helpers/form_helper.rb +755 -129
- data/lib/action_view/helpers/form_options_helper.rb +130 -75
- data/lib/action_view/helpers/form_tag_helper.rb +116 -71
- data/lib/action_view/helpers/javascript_helper.rb +30 -14
- data/lib/action_view/helpers/number_helper.rb +84 -59
- data/lib/action_view/helpers/output_safety_helper.rb +36 -4
- data/lib/action_view/helpers/rendering_helper.rb +11 -8
- data/lib/action_view/helpers/sanitize_helper.rb +30 -31
- data/lib/action_view/helpers/tag_helper.rb +201 -75
- data/lib/action_view/helpers/tags/base.rb +138 -98
- 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 +2 -1
- data/lib/action_view/helpers/tags/date_select.rb +37 -36
- data/lib/action_view/helpers/tags/datetime_field.rb +4 -3
- data/lib/action_view/helpers/tags/datetime_local_field.rb +2 -1
- 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 +2 -0
- data/lib/action_view/helpers/tags/label.rb +3 -2
- data/lib/action_view/helpers/tags/month_field.rb +2 -1
- 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 +2 -1
- 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 +2 -1
- 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 +91 -47
- data/lib/action_view/helpers/url_helper.rb +160 -105
- data/lib/action_view/helpers.rb +5 -3
- data/lib/action_view/layouts.rb +65 -61
- data/lib/action_view/log_subscriber.rb +61 -10
- data/lib/action_view/lookup_context.rb +147 -89
- data/lib/action_view/model_naming.rb +3 -1
- data/lib/action_view/path_set.rb +28 -23
- data/lib/action_view/railtie.rb +62 -6
- data/lib/action_view/record_identifier.rb +53 -26
- data/lib/action_view/renderer/abstract_renderer.rb +71 -13
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +103 -0
- data/lib/action_view/renderer/partial_renderer.rb +239 -225
- data/lib/action_view/renderer/renderer.rb +22 -8
- data/lib/action_view/renderer/streaming_template_renderer.rb +54 -54
- data/lib/action_view/renderer/template_renderer.rb +79 -73
- data/lib/action_view/rendering.rb +68 -44
- data/lib/action_view/routing_url_for.rb +33 -22
- 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 +87 -0
- data/lib/action_view/template/handlers/erb.rb +24 -86
- 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 +38 -8
- data/lib/action_view/template/html.rb +19 -10
- data/lib/action_view/template/inline.rb +22 -0
- data/lib/action_view/template/raw_file.rb +28 -0
- data/lib/action_view/template/resolver.rb +217 -193
- 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 +11 -10
- data/lib/action_view/template/types.rb +18 -18
- data/lib/action_view/template.rb +146 -90
- data/lib/action_view/test_case.rb +52 -32
- data/lib/action_view/testing/resolvers.rb +46 -34
- data/lib/action_view/unbound_template.rb +31 -0
- data/lib/action_view/version.rb +3 -1
- data/lib/action_view/view_paths.rb +48 -31
- data/lib/action_view.rb +11 -8
- data/lib/assets/compiled/rails-ujs.js +746 -0
- metadata +38 -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: 6ae3e4955963f84b4299850e39bf729597e07e7c0f9af6d79258a65131053f22
|
4
|
+
data.tar.gz: 609472d2030d8e4d54964169fe770a58e2a908f2a5b7c4e207a6496a8e4cd6a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0c4acc4e8cfb5e67b19ed61155b56ecb6b627d1e172ea8b38db4d2a6a4a2ec41db356581993e9ca228029896bdca775e40f4dba2a37120a3cb7b061a0d6d096
|
7
|
+
data.tar.gz: e2789295904614c027c6f4d1bade6b8d1beeae00d2cc224b59ee83af0073ce126d4f2bb5f210c2cd362668266f578449f6d022eb62fd0b216e9c83dba750a31e
|
data/CHANGELOG.md
CHANGED
@@ -1,357 +1,366 @@
|
|
1
|
-
## Rails
|
2
|
-
|
3
|
-
* No changes.
|
1
|
+
## Rails 6.0.4 (June 15, 2021) ##
|
4
2
|
|
3
|
+
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
4
|
+
call safe_list_sanitizer's class method
|
5
5
|
|
6
|
-
|
6
|
+
Fixes #39586
|
7
7
|
|
8
|
-
*
|
8
|
+
*Taufiq Muhammadi*
|
9
9
|
|
10
10
|
|
11
|
-
## Rails
|
11
|
+
## Rails 6.0.3.7 (May 05, 2021) ##
|
12
12
|
|
13
13
|
* No changes.
|
14
14
|
|
15
15
|
|
16
|
-
## Rails
|
16
|
+
## Rails 6.0.3.6 (March 26, 2021) ##
|
17
17
|
|
18
18
|
* No changes.
|
19
19
|
|
20
20
|
|
21
|
-
## Rails
|
21
|
+
## Rails 6.0.3.5 (February 10, 2021) ##
|
22
22
|
|
23
23
|
* No changes.
|
24
24
|
|
25
25
|
|
26
|
-
## Rails
|
26
|
+
## Rails 6.0.3.4 (October 07, 2020) ##
|
27
27
|
|
28
28
|
* No changes.
|
29
29
|
|
30
30
|
|
31
|
-
## Rails
|
31
|
+
## Rails 6.0.3.3 (September 09, 2020) ##
|
32
32
|
|
33
|
-
* Fix
|
34
|
-
attribute when assets are handled by Sprockets >=3.0.
|
33
|
+
* [CVE-2020-8185] Fix potential XSS vulnerability in the `translate`/`t` helper.
|
35
34
|
|
36
|
-
*
|
35
|
+
*Jonathan Hefner*
|
37
36
|
|
38
|
-
* Create a new `ActiveSupport::SafeBuffer` instance when `content_for` is flushed.
|
39
37
|
|
40
|
-
|
38
|
+
## Rails 6.0.3.2 (June 17, 2020) ##
|
41
39
|
|
42
|
-
|
40
|
+
* No changes.
|
43
41
|
|
44
|
-
* Respect value of `:object` if `:object` is false when rendering.
|
45
42
|
|
46
|
-
|
43
|
+
## Rails 6.0.3.1 (May 18, 2020) ##
|
47
44
|
|
48
|
-
|
45
|
+
* [CVE-2020-8167] Check that request is same-origin prior to including CSRF token in XHRs
|
49
46
|
|
50
|
-
* Generate `week_field` input values using a 1-based index and not a 0-based index
|
51
|
-
as per the W3 spec: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
|
52
47
|
|
53
|
-
|
48
|
+
## Rails 6.0.3 (May 06, 2020) ##
|
54
49
|
|
50
|
+
* annotated_source_code returns an empty array so TemplateErrors without a
|
51
|
+
template in the backtrace are surfaced properly by DebugExceptions.
|
55
52
|
|
56
|
-
|
53
|
+
*Guilherme Mansur*, *Kasper Timm Hansen*
|
57
54
|
|
58
|
-
*
|
55
|
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
59
56
|
|
60
|
-
|
57
|
+
*Guilherme Mansur*, *Gannon McGibbon*
|
61
58
|
|
62
|
-
*Arthur Neves*
|
63
59
|
|
60
|
+
## Rails 6.0.2.2 (March 19, 2020) ##
|
64
61
|
|
65
|
-
|
62
|
+
* Fix possible XSS vector in escape_javascript helper
|
66
63
|
|
67
|
-
|
68
|
-
method.
|
64
|
+
CVE-2020-5267
|
69
65
|
|
70
66
|
*Aaron Patterson*
|
71
67
|
|
72
68
|
|
73
|
-
## Rails
|
74
|
-
|
75
|
-
* Fix `mail_to` when called with `nil` as argument.
|
69
|
+
## Rails 6.0.2.1 (December 18, 2019) ##
|
76
70
|
|
77
|
-
|
78
|
-
|
79
|
-
* `url_for` does not modify its arguments when generating polymorphic URLs.
|
80
|
-
|
81
|
-
*Bernerd Schaefer*
|
71
|
+
* No changes.
|
82
72
|
|
83
73
|
|
84
|
-
## Rails
|
74
|
+
## Rails 6.0.2 (December 13, 2019) ##
|
85
75
|
|
86
|
-
*
|
76
|
+
* No changes.
|
87
77
|
|
88
78
|
|
89
|
-
## Rails
|
79
|
+
## Rails 6.0.1 (November 5, 2019) ##
|
90
80
|
|
91
|
-
*
|
92
|
-
translation is missing.
|
81
|
+
* UJS avoids `Element.closest()` for IE 9 compatibility.
|
93
82
|
|
94
|
-
|
83
|
+
*George Claghorn*
|
95
84
|
|
96
|
-
*Bernard Potocki*
|
97
85
|
|
98
|
-
|
86
|
+
## Rails 6.0.0 (August 16, 2019) ##
|
99
87
|
|
100
|
-
|
88
|
+
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
101
89
|
|
102
|
-
*
|
90
|
+
*Juanito Fatas*
|
103
91
|
|
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
92
|
|
108
|
-
|
93
|
+
## Rails 6.0.0.rc2 (July 22, 2019) ##
|
109
94
|
|
110
|
-
|
95
|
+
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
111
96
|
|
112
|
-
*
|
113
|
-
as input when `precision: 0` is used.
|
97
|
+
*Younes SERRAJ*
|
114
98
|
|
115
|
-
Fixes #19227.
|
116
99
|
|
117
|
-
|
100
|
+
## Rails 6.0.0.rc1 (April 24, 2019) ##
|
118
101
|
|
102
|
+
* Fix partial caching skips same item issue
|
119
103
|
|
120
|
-
|
104
|
+
If we render cached collection partials with repeated items, those repeated items
|
105
|
+
will get skipped. For example, if you have 5 identical items in your collection, Rails
|
106
|
+
only renders the first one when `cached` is set to true. But it should render all
|
107
|
+
5 items instead.
|
121
108
|
|
122
|
-
|
109
|
+
Fixes #35114.
|
123
110
|
|
111
|
+
*Stan Lo*
|
124
112
|
|
125
|
-
|
113
|
+
* Only clear ActionView cache in development on file changes
|
126
114
|
|
127
|
-
|
128
|
-
|
115
|
+
To speed up development mode, view caches are only cleared when files in
|
116
|
+
the view paths have changed. Applications which have implemented custom
|
117
|
+
`ActionView::Resolver` subclasses may need to add their own cache clearing.
|
129
118
|
|
130
|
-
*
|
119
|
+
*John Hawthorn*
|
131
120
|
|
132
|
-
*
|
133
|
-
for partial `rendering`, when the value of option `as` has invalid characters.
|
121
|
+
* Fix `ActionView::FixtureResolver` so that it handles template variants correctly.
|
134
122
|
|
135
|
-
*
|
123
|
+
*Edward Rudd*
|
136
124
|
|
125
|
+
* `ActionView::TemplateRender.render(file: )` now renders the file directly,
|
126
|
+
without using any handlers, using the new `Template::RawFile` class.
|
137
127
|
|
138
|
-
|
128
|
+
*John Hawthorn*, *Cliff Pruitt*
|
139
129
|
|
140
|
-
* Local variable in a partial is now available even if a falsy value is
|
141
|
-
passed to `:object` when rendering a partial.
|
142
130
|
|
143
|
-
|
131
|
+
## Rails 6.0.0.beta3 (March 11, 2019) ##
|
144
132
|
|
145
|
-
|
133
|
+
* Only accept formats from registered mime types
|
146
134
|
|
147
|
-
|
135
|
+
A lack of filtering on mime types could allow an attacker to read
|
136
|
+
arbitrary files on the target server or to perform a denial of service
|
137
|
+
attack.
|
148
138
|
|
149
|
-
|
150
|
-
|
139
|
+
Fixes CVE-2019-5418
|
140
|
+
Fixes CVE-2019-5419
|
151
141
|
|
152
|
-
*
|
142
|
+
*John Hawthorn*, *Eileen M. Uchitelle*, *Aaron Patterson*
|
153
143
|
|
154
|
-
* Fix a bug that <%= foo(){ %> and <%= foo()do %> in view templates were not regarded
|
155
|
-
as Ruby block calls.
|
156
144
|
|
157
|
-
|
145
|
+
## Rails 6.0.0.beta2 (February 25, 2019) ##
|
158
146
|
|
159
|
-
*
|
147
|
+
* `ActionView::Template.finalize_compiled_template_methods` is deprecated with
|
148
|
+
no replacement.
|
160
149
|
|
161
|
-
|
150
|
+
*tenderlove*
|
162
151
|
|
163
|
-
|
152
|
+
* `config.action_view.finalize_compiled_template_methods` is deprecated with
|
153
|
+
no replacement.
|
164
154
|
|
165
|
-
*
|
155
|
+
*tenderlove*
|
166
156
|
|
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.
|
157
|
+
* Ensure unique DOM IDs for collection inputs with float values.
|
171
158
|
|
172
|
-
|
159
|
+
Fixes #34974.
|
173
160
|
|
174
|
-
*
|
161
|
+
*Mark Edmondson*
|
175
162
|
|
176
|
-
|
163
|
+
* Single arity template handlers are deprecated. Template handlers must
|
164
|
+
now accept two parameters, the view object and the source for the view object.
|
177
165
|
|
178
|
-
|
166
|
+
*tenderlove*
|
179
167
|
|
180
|
-
now generates:
|
181
168
|
|
182
|
-
|
169
|
+
## Rails 6.0.0.beta1 (January 18, 2019) ##
|
183
170
|
|
184
|
-
|
171
|
+
* [Rename npm package](https://github.com/rails/rails/pull/34905) from
|
172
|
+
[`rails-ujs`](https://www.npmjs.com/package/rails-ujs) to
|
173
|
+
[`@rails/ujs`](https://www.npmjs.com/package/@rails/ujs).
|
185
174
|
|
186
|
-
*
|
175
|
+
*Javan Makhmali*
|
187
176
|
|
188
|
-
|
189
|
-
when you want to customize how a particular label is presented.
|
177
|
+
* Remove deprecated `image_alt` helper.
|
190
178
|
|
191
|
-
*
|
179
|
+
*Rafael Mendonça França*
|
192
180
|
|
193
|
-
*
|
181
|
+
* Fix the need of `#protect_against_forgery?` method defined in
|
182
|
+
`ActionView::Base` subclasses. This prevents the use of forms and buttons.
|
194
183
|
|
195
|
-
|
184
|
+
*Genadi Samokovarov*
|
196
185
|
|
197
|
-
|
186
|
+
* Fix UJS permanently showing disabled text in a[data-remote][data-disable-with] elements within forms.
|
198
187
|
|
199
|
-
|
188
|
+
Fixes #33889.
|
200
189
|
|
201
|
-
*
|
190
|
+
*Wolfgang Hobmaier*
|
202
191
|
|
203
|
-
*
|
192
|
+
* Prevent non-primary mouse keys from triggering Rails UJS click handlers.
|
193
|
+
Firefox fires click events even if the click was triggered by non-primary mouse keys such as right- or scroll-wheel-clicks.
|
194
|
+
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.
|
204
195
|
|
205
|
-
|
206
|
-
|
196
|
+
```
|
197
|
+
<%= link_to 'Remote', remote_path, class: 'remote', remote: true, data: { type: :json } %>
|
198
|
+
```
|
207
199
|
|
208
|
-
|
209
|
-
the current `index` and two convenience methods `first?` and `last?`.
|
200
|
+
Fixes #34541.
|
210
201
|
|
211
|
-
*
|
202
|
+
*Wolfgang Hobmaier*
|
212
203
|
|
213
|
-
*
|
214
|
-
of the `asset_host` proc returning nil.
|
204
|
+
* Prevent `ActionView::TextHelper#word_wrap` from unexpectedly stripping white space from the _left_ side of lines.
|
215
205
|
|
216
|
-
|
206
|
+
For example, given input like this:
|
217
207
|
|
218
|
-
|
208
|
+
```
|
209
|
+
This is a paragraph with an initial indent,
|
210
|
+
followed by additional lines that are not indented,
|
211
|
+
and finally terminated with a blockquote:
|
212
|
+
"A pithy saying"
|
213
|
+
```
|
219
214
|
|
220
|
-
|
215
|
+
Calling `word_wrap` should not trim the indents on the first and last lines.
|
221
216
|
|
222
|
-
|
217
|
+
Fixes #34487.
|
223
218
|
|
224
|
-
*
|
219
|
+
*Lyle Mullican*
|
225
220
|
|
226
|
-
*
|
227
|
-
option.
|
221
|
+
* Add allocations to template rendering instrumentation.
|
228
222
|
|
229
|
-
|
223
|
+
Adds the allocations for template and partial rendering to the server output on render.
|
230
224
|
|
231
|
-
|
225
|
+
```
|
226
|
+
Rendered posts/_form.html.erb (Duration: 7.1ms | Allocations: 6004)
|
227
|
+
Rendered posts/new.html.erb within layouts/application (Duration: 8.3ms | Allocations: 6654)
|
228
|
+
Completed 200 OK in 858ms (Views: 848.4ms | ActiveRecord: 0.4ms | Allocations: 1539564)
|
229
|
+
```
|
232
230
|
|
233
|
-
*
|
231
|
+
*Eileen M. Uchitelle*, *Aaron Patterson*
|
234
232
|
|
235
|
-
*
|
236
|
-
`Array#join`.
|
233
|
+
* Respect the `only_path` option passed to `url_for` when the options are passed in as an array
|
237
234
|
|
238
|
-
|
235
|
+
Fixes #33237.
|
239
236
|
|
240
|
-
*
|
241
|
-
values.
|
237
|
+
*Joel Ambass*
|
242
238
|
|
243
|
-
|
239
|
+
* Deprecate calling private model methods from view helpers.
|
244
240
|
|
245
|
-
|
241
|
+
For example, in methods like `options_from_collection_for_select`
|
242
|
+
and `collection_select` it is possible to call private methods from
|
243
|
+
the objects used.
|
246
244
|
|
247
|
-
|
245
|
+
Fixes #33546.
|
248
246
|
|
249
|
-
*
|
247
|
+
*Ana María Martínez Gómez*
|
250
248
|
|
251
|
-
*
|
249
|
+
* Fix issue with `button_to`'s `to_form_params`
|
252
250
|
|
253
|
-
|
251
|
+
`button_to` was throwing exception when invoked with `params` hash that
|
252
|
+
contains symbol and string keys. The reason for the exception was that
|
253
|
+
`to_form_params` was comparing the given symbol and string keys.
|
254
254
|
|
255
|
-
|
256
|
-
|
255
|
+
The issue is fixed by turning all keys to strings inside
|
256
|
+
`to_form_params` before comparing them.
|
257
257
|
|
258
|
-
*
|
258
|
+
*Georgi Georgiev*
|
259
259
|
|
260
|
-
*
|
261
|
-
Override `AbstractController::Base.local_prefixes` when you want to change
|
262
|
-
where to find views.
|
260
|
+
* Mark arrays of translations as trusted safe by using the `_html` suffix.
|
263
261
|
|
264
|
-
|
262
|
+
Example:
|
265
263
|
|
266
|
-
|
264
|
+
en:
|
265
|
+
foo_html:
|
266
|
+
- "One"
|
267
|
+
- "<strong>Two</strong>"
|
268
|
+
- "Three 👋 🙂"
|
267
269
|
|
268
|
-
|
270
|
+
*Juan Broullon*
|
269
271
|
|
270
|
-
|
271
|
-
|
272
|
-
<%= f.label :type, value: "long" %>
|
273
|
-
<% end %>
|
272
|
+
* Add `year_format` option to date_select tag. This option makes it possible to customize year
|
273
|
+
names. Lambda should be passed to use this option.
|
274
274
|
|
275
|
-
|
276
|
-
en:
|
277
|
-
activerecord:
|
278
|
-
attributes:
|
279
|
-
post/long: "Long-form Post"
|
275
|
+
Example:
|
280
276
|
|
281
|
-
|
282
|
-
Post".
|
277
|
+
date_select('user_birthday', '', start_year: 1998, end_year: 2000, year_format: ->year { "Heisei #{year - 1988}" })
|
283
278
|
|
284
|
-
|
279
|
+
The HTML produced:
|
285
280
|
|
286
|
-
|
281
|
+
<select id="user_birthday__1i" name="user_birthday[(1i)]">
|
282
|
+
<option value="1998">Heisei 10</option>
|
283
|
+
<option value="1999">Heisei 11</option>
|
284
|
+
<option value="2000">Heisei 12</option>
|
285
|
+
</select>
|
286
|
+
/* The rest is omitted */
|
287
287
|
|
288
|
-
|
288
|
+
*Koki Ryu*
|
289
289
|
|
290
|
-
|
290
|
+
* Fix JavaScript views rendering does not work with Firefox when using
|
291
|
+
Content Security Policy.
|
291
292
|
|
292
|
-
|
293
|
+
Fixes #32577.
|
293
294
|
|
294
|
-
|
295
|
+
*Yuji Yaginuma*
|
295
296
|
|
296
|
-
|
297
|
+
* Add the `nonce: true` option for `javascript_include_tag` helper to
|
298
|
+
support automatic nonce generation for Content Security Policy.
|
299
|
+
Works the same way as `javascript_tag nonce: true` does.
|
297
300
|
|
298
|
-
*
|
299
|
-
`image/x-icon`.
|
301
|
+
*Yaroslav Markin*
|
300
302
|
|
301
|
-
|
303
|
+
* Remove `ActionView::Helpers::RecordTagHelper`.
|
302
304
|
|
303
|
-
|
304
|
-
<link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
|
305
|
+
*Yoshiyuki Hirano*
|
305
306
|
|
306
|
-
|
307
|
+
* Disable `ActionView::Template` finalizers in test environment.
|
307
308
|
|
308
|
-
|
309
|
-
|
309
|
+
Template finalization can be expensive in large view test suites.
|
310
|
+
Add a configuration option,
|
311
|
+
`action_view.finalize_compiled_template_methods`, and turn it off in
|
312
|
+
the test environment.
|
310
313
|
|
311
|
-
*
|
314
|
+
*Simon Coffey*
|
312
315
|
|
313
|
-
*
|
316
|
+
* Extract the `confirm` call in its own, overridable method in `rails_ujs`.
|
314
317
|
|
315
|
-
|
316
|
-
inside a form are valid HTML5, and the absence of inline styles help in validating
|
317
|
-
for Content Security Policy.
|
318
|
+
Example:
|
318
319
|
|
319
|
-
|
320
|
+
Rails.confirm = function(message, element) {
|
321
|
+
return (my_bootstrap_modal_confirm(message));
|
322
|
+
}
|
320
323
|
|
321
|
-
*
|
324
|
+
*Mathieu Mahé*
|
322
325
|
|
323
|
-
|
326
|
+
* Enable select tag helper to mark `prompt` option as `selected` and/or `disabled` for `required`
|
327
|
+
field.
|
324
328
|
|
325
|
-
|
329
|
+
Example:
|
326
330
|
|
327
|
-
|
331
|
+
select :post,
|
332
|
+
:category,
|
333
|
+
["lifestyle", "programming", "spiritual"],
|
334
|
+
{ selected: "", disabled: "", prompt: "Choose one" },
|
335
|
+
{ required: true }
|
328
336
|
|
329
|
-
|
337
|
+
Placeholder option would be selected and disabled.
|
330
338
|
|
331
|
-
|
332
|
-
as input.
|
339
|
+
The HTML produced:
|
333
340
|
|
334
|
-
|
341
|
+
<select required="required" name="post[category]" id="post_category">
|
342
|
+
<option disabled="disabled" selected="selected" value="">Choose one</option>
|
343
|
+
<option value="lifestyle">lifestyle</option>
|
344
|
+
<option value="programming">programming</option>
|
345
|
+
<option value="spiritual">spiritual</option></select>
|
335
346
|
|
336
|
-
*
|
347
|
+
*Sergey Prikhodko*
|
337
348
|
|
338
|
-
*
|
349
|
+
* Don't enforce UTF-8 by default.
|
339
350
|
|
340
|
-
|
351
|
+
With the disabling of TLS 1.0 by most major websites, continuing to run
|
352
|
+
IE8 or lower becomes increasingly difficult so default to not enforcing
|
353
|
+
UTF-8 encoding as it's not relevant to other browsers.
|
341
354
|
|
342
|
-
*
|
343
|
-
applied correctly.
|
355
|
+
*Andrew White*
|
344
356
|
|
345
|
-
|
357
|
+
* Change translation key of `submit_tag` from `module_name_class_name` to `module_name/class_name`.
|
346
358
|
|
347
|
-
*
|
359
|
+
*Rui Onodera*
|
348
360
|
|
349
|
-
*
|
361
|
+
* Rails 6 requires Ruby 2.5.0 or newer.
|
350
362
|
|
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.
|
363
|
+
*Jeremy Daer*, *Kasper Timm Hansen*
|
354
364
|
|
355
|
-
*Piotr Chmolowski, Łukasz Strzałkowski*
|
356
365
|
|
357
|
-
Please check [
|
366
|
+
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/actionview/CHANGELOG.md) for previous changes.
|
data/MIT-LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -5,35 +5,36 @@ 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:
|
11
13
|
|
12
|
-
|
14
|
+
$ gem install actionview
|
13
15
|
|
14
|
-
Source code can be downloaded as part of the Rails project on GitHub
|
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
|
20
22
|
|
21
23
|
Action View is released under the MIT license:
|
22
24
|
|
23
|
-
*
|
25
|
+
* https://opensource.org/licenses/MIT
|
24
26
|
|
25
27
|
|
26
28
|
== Support
|
27
29
|
|
28
30
|
API documentation is at
|
29
31
|
|
30
|
-
*
|
32
|
+
* https://api.rubyonrails.org
|
31
33
|
|
32
|
-
Bug reports
|
34
|
+
Bug reports for the Ruby on Rails project can be filed here:
|
33
35
|
|
34
36
|
* https://github.com/rails/rails/issues
|
35
37
|
|
36
38
|
Feature requests should be discussed on the rails-core mailing list here:
|
37
39
|
|
38
|
-
* https://
|
39
|
-
|
40
|
+
* https://discuss.rubyonrails.org/c/rubyonrails-core
|