actionview 4.1.13 → 6.1.3.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 +5 -5
- data/CHANGELOG.md +181 -359
- data/MIT-LICENSE +1 -1
- data/README.rdoc +12 -6
- data/lib/action_view/base.rb +115 -43
- data/lib/action_view/buffers.rb +22 -4
- 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 -84
- data/lib/action_view/flows.rb +12 -13
- 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 +311 -105
- data/lib/action_view/helpers/asset_url_helper.rb +197 -80
- data/lib/action_view/helpers/atom_feed_helper.rb +20 -17
- data/lib/action_view/helpers/cache_helper.rb +109 -45
- data/lib/action_view/helpers/capture_helper.rb +20 -22
- 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 +245 -140
- data/lib/action_view/helpers/debug_helper.rb +14 -17
- data/lib/action_view/helpers/form_helper.rb +875 -148
- data/lib/action_view/helpers/form_options_helper.rb +128 -82
- data/lib/action_view/helpers/form_tag_helper.rb +253 -91
- data/lib/action_view/helpers/javascript_helper.rb +37 -15
- data/lib/action_view/helpers/number_helper.rb +100 -77
- data/lib/action_view/helpers/output_safety_helper.rb +42 -10
- data/lib/action_view/helpers/rendering_helper.rb +26 -15
- data/lib/action_view/helpers/sanitize_helper.rb +79 -164
- data/lib/action_view/helpers/tag_helper.rb +277 -64
- data/lib/action_view/helpers/tags/base.rb +143 -92
- 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 -30
- 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 +14 -5
- 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 +2 -0
- data/lib/action_view/helpers/tags/label.rb +41 -22
- 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 +24 -0
- 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 +3 -0
- 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 +7 -1
- data/lib/action_view/helpers/tags/text_field.rb +11 -7
- 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 +39 -0
- 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 +4 -1
- data/lib/action_view/helpers/text_helper.rb +80 -45
- data/lib/action_view/helpers/translation_helper.rb +148 -67
- data/lib/action_view/helpers/url_helper.rb +289 -147
- data/lib/action_view/helpers.rb +5 -3
- data/lib/action_view/layouts.rb +68 -63
- data/lib/action_view/log_subscriber.rb +80 -13
- data/lib/action_view/lookup_context.rb +137 -92
- data/lib/action_view/model_naming.rb +4 -2
- data/lib/action_view/path_set.rb +30 -16
- 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 +152 -13
- 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 +61 -261
- data/lib/action_view/renderer/renderer.rb +67 -6
- data/lib/action_view/renderer/streaming_template_renderer.rb +58 -54
- data/lib/action_view/renderer/template_renderer.rb +83 -75
- data/lib/action_view/rendering.rb +73 -46
- data/lib/action_view/routing_url_for.rb +54 -17
- 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 +22 -9
- 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 +267 -181
- 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 +109 -99
- data/lib/action_view/test_case.rb +73 -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 +74 -44
- data/lib/action_view.rb +14 -9
- data/lib/assets/compiled/rails-ujs.js +746 -0
- metadata +71 -26
- data/lib/action_view/helpers/record_tag_helper.rb +0 -108
- data/lib/action_view/tasks/dependencies.rake +0 -23
- data/lib/action_view/vendor/html-scanner/html/document.rb +0 -68
- data/lib/action_view/vendor/html-scanner/html/node.rb +0 -532
- data/lib/action_view/vendor/html-scanner/html/sanitizer.rb +0 -188
- data/lib/action_view/vendor/html-scanner/html/selector.rb +0 -830
- data/lib/action_view/vendor/html-scanner/html/tokenizer.rb +0 -107
- data/lib/action_view/vendor/html-scanner/html/version.rb +0 -11
- data/lib/action_view/vendor/html-scanner.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b4c5b5daaf81e8ceaf98fbdc431da0d862fc1e4cfe54a267dec7535e128eeeee
|
4
|
+
data.tar.gz: 8de83e0aff66bf999c15c2164dca7398a16b89784148b0756070659184719a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecb0ce5f0514023f0b0598eb175fcd9958377426d7a4ff66f7ce308159e3b7ed542d66d0a96dcb77d8d19f5382b995d207b439015fda828510932efa0763dc9f
|
7
|
+
data.tar.gz: bd1824cc61e90ac8ec3ae54d3ecb67bc43a2865bb34e76efbb2f0ae43d8a6143b08bc75292f3fb231fa9f94cb661e9410d8a1384ba98601183ca5e341013ac53
|
data/CHANGELOG.md
CHANGED
@@ -1,502 +1,324 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 6.1.3.1 (March 26, 2021) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails
|
7
|
-
|
8
|
-
* `translate` should handle `raise` flag correctly in case of both main and default
|
9
|
-
translation is missing.
|
10
|
-
|
11
|
-
Fixes #19967
|
12
|
-
|
13
|
-
*Bernard Potocki*
|
14
|
-
|
15
|
-
* `translate` should accept nils as members of the `:default`
|
16
|
-
parameter without raising a translation missing error. Fixes a
|
17
|
-
regression introduced 362557e.
|
18
|
-
|
19
|
-
Fixes #19419
|
20
|
-
|
21
|
-
*Justin Coyne*
|
22
|
-
|
23
|
-
* `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
|
24
|
-
as input when `precision: 0` is used.
|
25
|
-
|
26
|
-
Fixes #19227.
|
27
|
-
|
28
|
-
*Yves Senn*
|
29
|
-
|
30
|
-
|
31
|
-
## Rails 4.1.11 (June 16, 2015) ##
|
32
|
-
|
33
|
-
* No changes.
|
34
|
-
|
35
|
-
|
36
|
-
## Rails 4.1.10 (March 19, 2015) ##
|
37
|
-
|
38
|
-
* Local variable in a partial is now available even if a falsy value is
|
39
|
-
passed to `:object` when rendering a partial.
|
40
|
-
|
41
|
-
Fixes #17373.
|
42
|
-
|
43
|
-
*Agis Anastasopoulos*
|
44
|
-
|
45
|
-
* Default translations that have a lower precidence than an html safe default,
|
46
|
-
but are not themselves safe, should not be marked as html_safe.
|
47
|
-
|
48
|
-
*Justin Coyne*
|
49
|
-
|
50
|
-
## Rails 4.1.9 (January 6, 2015) ##
|
51
|
-
|
52
|
-
* Added an explicit error message, in `ActionView::PartialRenderer`
|
53
|
-
for partial `rendering`, when the value of option `as` has invalid characters.
|
54
|
-
|
55
|
-
*Angelo Capilleri*
|
56
|
-
|
57
|
-
|
58
|
-
## Rails 4.1.8 (November 16, 2014) ##
|
59
|
-
|
60
|
-
* Update `select_tag` to work correctly with `:include_blank` option passing a string.
|
61
|
-
|
62
|
-
Fixes #16483.
|
63
|
-
|
64
|
-
*Frank Groeneveld*
|
65
|
-
|
66
|
-
|
67
|
-
## Rails 4.1.7.1 (November 19, 2014) ##
|
68
|
-
|
69
|
-
* No changes.
|
70
|
-
|
71
|
-
|
72
|
-
## Rails 4.1.7 (October 29, 2014) ##
|
73
|
-
|
74
|
-
* No changes.
|
75
|
-
|
76
|
-
|
77
|
-
## Rails 4.1.6 (September 11, 2014) ##
|
78
|
-
|
79
|
-
* Fix that render layout: 'messages/layout' should also be added to the dependency tracker tree.
|
80
|
-
|
81
|
-
*DHH*
|
82
|
-
|
83
|
-
* Return an absolute instead of relative path from an asset url in the case
|
84
|
-
of the `asset_host` proc returning nil
|
85
|
-
|
86
|
-
*Jolyon Pawlyn*
|
87
|
-
|
88
|
-
* Fix `html_escape_once` to properly handle hex escape sequences (e.g. ᨫ)
|
89
|
-
|
90
|
-
*John F. Douthat*
|
91
|
-
|
92
|
-
* Bring `cache_digest` rake tasks up-to-date with the latest API changes
|
93
|
-
|
94
|
-
*Jiri Pospisil*
|
95
|
-
|
96
|
-
|
97
|
-
## Rails 4.1.5 (August 18, 2014) ##
|
6
|
+
## Rails 6.1.3 (February 17, 2021) ##
|
98
7
|
|
99
8
|
* No changes.
|
100
9
|
|
101
10
|
|
102
|
-
## Rails
|
11
|
+
## Rails 6.1.2.1 (February 10, 2021) ##
|
103
12
|
|
104
13
|
* No changes.
|
105
14
|
|
106
15
|
|
107
|
-
## Rails
|
108
|
-
|
109
|
-
* No changes.
|
110
|
-
|
111
|
-
|
112
|
-
## Rails 4.1.2 (June 26, 2014) ##
|
113
|
-
|
114
|
-
* Change `asset_path` to use File.join to create proper paths.
|
115
|
-
|
116
|
-
https://some.host.com//assets/some.js
|
117
|
-
|
118
|
-
becomes
|
119
|
-
|
120
|
-
https://some.host.com/assets/some.js
|
121
|
-
|
122
|
-
*Peter Schröder*
|
123
|
-
|
124
|
-
* `collection_check_boxes` respects `:index` option for the hidden field name.
|
125
|
-
|
126
|
-
Fixes #14147.
|
127
|
-
|
128
|
-
*Vasiliy Ermolovich*
|
129
|
-
|
130
|
-
* `date_select` helper with option `with_css_classes: true` does not overwrite other classes.
|
131
|
-
|
132
|
-
*Izumi Wong-Horiuchi*
|
133
|
-
|
134
|
-
|
135
|
-
## Rails 4.1.1 (May 6, 2014) ##
|
16
|
+
## Rails 6.1.2 (February 09, 2021) ##
|
136
17
|
|
137
18
|
* No changes.
|
138
19
|
|
139
20
|
|
140
|
-
## Rails
|
141
|
-
|
142
|
-
* Fixed ActionView::Digestor template lookup to use the lookup_context exclusively, and not rely on the passed-in format.
|
143
|
-
This unfortunately means that the cache_key changed, so upgrading will invalidate all prior caches. Take note if you rely
|
144
|
-
heavily on caching in production when you push this live.
|
145
|
-
|
146
|
-
*DHH*
|
147
|
-
|
148
|
-
* `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
|
149
|
-
as input.
|
150
|
-
|
151
|
-
Fixes #14405.
|
21
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
152
22
|
|
153
|
-
|
23
|
+
* Fix lazy translation in partial with block.
|
154
24
|
|
155
|
-
*
|
25
|
+
*Marek Kasztelnik*
|
156
26
|
|
157
|
-
|
158
|
-
to support variants and allow more flexibility in the future. The support for
|
159
|
-
regular (required) arguments is deprecated and will be removed in Rails 5.0 or later.
|
27
|
+
* Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
|
160
28
|
|
161
|
-
*
|
29
|
+
*aar0nr*
|
162
30
|
|
163
|
-
*
|
164
|
-
being applied correctly.
|
31
|
+
* Link preloading keep integrity hashes in the header.
|
165
32
|
|
166
|
-
|
33
|
+
*Étienne Barrié*
|
167
34
|
|
168
|
-
|
35
|
+
* Add `config.action_view.preload_links_header` to allow disabling of
|
36
|
+
the `Link` header being added by default when using `stylesheet_link_tag`
|
37
|
+
and `javascript_include_tag`.
|
169
38
|
|
170
|
-
*
|
39
|
+
*Andrew White*
|
171
40
|
|
172
|
-
|
41
|
+
* The `translate` helper now resolves `default` values when a `nil` key is
|
42
|
+
specified, instead of always returning `nil`.
|
173
43
|
|
174
|
-
*
|
175
|
-
the ActionPack release notes for more detail.
|
44
|
+
*Jonathan Hefner*
|
176
45
|
|
177
|
-
*Prem Sichanugrist*
|
178
46
|
|
179
|
-
|
180
|
-
new option `:month_format_string`.
|
47
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
181
48
|
|
182
|
-
|
183
|
-
|
49
|
+
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
50
|
+
call safe_list_sanitizer's class method
|
184
51
|
|
185
|
-
|
52
|
+
Fixes #39586
|
186
53
|
|
187
|
-
|
54
|
+
*Taufiq Muhammadi*
|
188
55
|
|
189
|
-
|
56
|
+
* Change form_with to generate non-remote forms by default.
|
190
57
|
|
191
|
-
|
58
|
+
`form_with` would generate a remote form by default. This would confuse
|
59
|
+
users because they were forced to handle remote requests.
|
192
60
|
|
193
|
-
|
194
|
-
|
61
|
+
All new 6.1 applications will generate non-remote forms by default.
|
62
|
+
When upgrading a 6.0 application you can enable remote forms by default by
|
63
|
+
setting `config.action_view.form_with_generates_remote_forms` to `true`.
|
195
64
|
|
196
|
-
|
65
|
+
*Petrik de Heus*
|
197
66
|
|
198
|
-
|
67
|
+
* Yield translated strings to calls of `ActionView::FormBuilder#button`
|
68
|
+
when a block is given.
|
199
69
|
|
200
|
-
*
|
201
|
-
calls can be matched.
|
70
|
+
*Sean Doyle*
|
202
71
|
|
203
|
-
|
72
|
+
* Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
|
73
|
+
`#to_s` so that `form.label` calls can yield that value to their blocks.
|
204
74
|
|
205
|
-
*
|
75
|
+
*Sean Doyle*
|
206
76
|
|
207
|
-
*
|
77
|
+
* Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
|
78
|
+
and make the original available as an alias.
|
208
79
|
|
209
|
-
|
80
|
+
token_list("foo", "foo bar")
|
81
|
+
# => "foo bar"
|
210
82
|
|
211
|
-
*
|
83
|
+
*Sean Doyle*
|
212
84
|
|
213
|
-
*
|
85
|
+
* ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
|
86
|
+
values. This is useful when declaring lists of label text identifiers in
|
87
|
+
`aria-labelledby` or `aria-describedby`.
|
214
88
|
|
215
|
-
|
216
|
-
|
217
|
-
|
89
|
+
tag.input type: 'checkbox', name: 'published', aria: {
|
90
|
+
invalid: @post.errors[:published].any?,
|
91
|
+
labelledby: ['published_context', 'published_label'],
|
92
|
+
describedby: { published_errors: @post.errors[:published].any? }
|
93
|
+
}
|
94
|
+
#=> <input
|
95
|
+
type="checkbox" name="published" aria-invalid="true"
|
96
|
+
aria-labelledby="published_context published_label"
|
97
|
+
aria-describedby="published_errors"
|
98
|
+
>
|
218
99
|
|
219
|
-
*
|
100
|
+
*Sean Doyle*
|
220
101
|
|
221
|
-
*
|
102
|
+
* Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
|
222
103
|
|
223
|
-
|
224
|
-
|
225
|
-
* A Cycle object should accept an array and cycle through it as it would with a set of
|
226
|
-
comma-separated objects.
|
227
|
-
|
228
|
-
arr = [1,2,3]
|
229
|
-
cycle(arr) # => '1'
|
230
|
-
cycle(arr) # => '2'
|
231
|
-
cycle(arr) # => '3'
|
232
|
-
|
233
|
-
Previously, it would return the array as a string, because it took the array as a
|
234
|
-
single object:
|
235
|
-
|
236
|
-
arr = [1,2,3]
|
237
|
-
cycle(arr) # => '[1,2,3]'
|
238
|
-
cycle(arr) # => '[1,2,3]'
|
239
|
-
cycle(arr) # => '[1,2,3]'
|
240
|
-
|
241
|
-
*Kristian Freeman*
|
242
|
-
|
243
|
-
* Label tags generated by collection helpers only inherit the `:index` and
|
244
|
-
`:namespace` from the input, because only these attributes modify the
|
245
|
-
`for` attribute of the label. Also, the input attributes don't have
|
246
|
-
precedence over the label attributes anymore.
|
247
|
-
|
248
|
-
Before:
|
249
|
-
|
250
|
-
collection = [[1, true, { class: 'foo' }]]
|
251
|
-
f.collection_check_boxes :options, collection, :second, :first do |b|
|
252
|
-
b.label(class: 'my_custom_class')
|
253
|
-
end
|
254
|
-
|
255
|
-
# => <label class="foo" for="user_active_true">1</label>
|
256
|
-
|
257
|
-
After:
|
258
|
-
|
259
|
-
collection = [[1, true, { class: 'foo' }]]
|
260
|
-
f.collection_check_boxes :options, collection, :second, :first do |b|
|
261
|
-
b.label(class: 'my_custom_class')
|
262
|
-
end
|
263
|
-
|
264
|
-
# => <label class="my_custom_class" for="user_active_true">1</label>
|
265
|
-
|
266
|
-
*Andriel Nuernberg*
|
104
|
+
*Rafael Mendonça França*
|
267
105
|
|
268
|
-
*
|
269
|
-
This method also escapes the \u2028 and \u2029 unicode newline characters which are
|
270
|
-
treated as \n in JavaScript. This matches the behaviour of the AS::JSON encoder. (The
|
271
|
-
original change in the encoder was introduced in #10534.)
|
106
|
+
* Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
|
272
107
|
|
273
|
-
*
|
108
|
+
*Rafael Mendonça França*
|
274
109
|
|
275
|
-
* `
|
110
|
+
* Remove deprecated `formats` from `ActionView::Template::HTML`.
|
276
111
|
|
277
|
-
|
112
|
+
*Rafael Mendonça França*
|
278
113
|
|
279
|
-
|
114
|
+
* Remove deprecated `formats` from `ActionView::Template::RawFile`.
|
280
115
|
|
281
|
-
*
|
116
|
+
*Rafael Mendonça França*
|
282
117
|
|
283
|
-
|
118
|
+
* Remove deprecated `formats` from `ActionView::Template::Text`.
|
284
119
|
|
285
|
-
*
|
120
|
+
*Rafael Mendonça França*
|
286
121
|
|
287
|
-
|
122
|
+
* Remove deprecated `find_file` from `ActionView::PathSet`.
|
288
123
|
|
289
|
-
*
|
290
|
-
combining recursive templates with `ActionView::Resolver.caching = false`.
|
124
|
+
*Rafael Mendonça França*
|
291
125
|
|
292
|
-
|
126
|
+
* Remove deprecated `rendered_format` from `ActionView::LookupContext`.
|
293
127
|
|
294
|
-
*
|
295
|
-
name attribute provided in the options hash.
|
128
|
+
*Rafael Mendonça França*
|
296
129
|
|
297
|
-
|
130
|
+
* Remove deprecated `find_file` from `ActionView::ViewPaths`.
|
298
131
|
|
299
|
-
*
|
132
|
+
*Rafael Mendonça França*
|
300
133
|
|
301
|
-
|
134
|
+
* Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
|
302
135
|
|
303
|
-
*
|
136
|
+
*Rafael Mendonça França*
|
304
137
|
|
305
|
-
|
138
|
+
* Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
|
139
|
+
in `ActionView::Base#initialize`.
|
306
140
|
|
307
|
-
|
308
|
-
<% available_campaigns.each do |c| -%>
|
309
|
-
<%= content_tag(:option, c.name, value: c.id, data: { tags: c.tags.to_json }) %>
|
310
|
-
<% end -%>
|
311
|
-
<% end -%>
|
141
|
+
*Rafael Mendonça França*
|
312
142
|
|
313
|
-
|
143
|
+
* Remove deprecated `format` argument `ActionView::Base#initialize`.
|
314
144
|
|
315
|
-
*
|
145
|
+
*Rafael Mendonça França*
|
316
146
|
|
317
|
-
|
147
|
+
* Remove deprecated `ActionView::Template#refresh`.
|
318
148
|
|
319
|
-
*
|
149
|
+
*Rafael Mendonça França*
|
320
150
|
|
321
|
-
|
322
|
-
generating an HTML id attribute of the form element.
|
151
|
+
* Remove deprecated `ActionView::Template#original_encoding`.
|
323
152
|
|
324
|
-
*
|
153
|
+
*Rafael Mendonça França*
|
325
154
|
|
326
|
-
*
|
155
|
+
* Remove deprecated `ActionView::Template#variants`.
|
327
156
|
|
328
|
-
*
|
157
|
+
*Rafael Mendonça França*
|
329
158
|
|
330
|
-
*
|
159
|
+
* Remove deprecated `ActionView::Template#formats`.
|
331
160
|
|
332
|
-
*
|
161
|
+
*Rafael Mendonça França*
|
333
162
|
|
334
|
-
*
|
335
|
-
when caching the digest of a template - changes to the details now
|
336
|
-
cause a different cache key to be used.
|
163
|
+
* Remove deprecated `ActionView::Template#virtual_path=`.
|
337
164
|
|
338
|
-
*
|
165
|
+
*Rafael Mendonça França*
|
339
166
|
|
340
|
-
*
|
167
|
+
* Remove deprecated `ActionView::Template#updated_at`.
|
341
168
|
|
342
|
-
|
169
|
+
*Rafael Mendonça França*
|
343
170
|
|
344
|
-
|
345
|
-
# => <script src="/javascripts/templates.jst.js"></script>
|
171
|
+
* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
|
346
172
|
|
347
|
-
|
173
|
+
*Rafael Mendonça França*
|
348
174
|
|
349
|
-
|
350
|
-
# => <script src="/javascripts/templates.jst"></script>
|
175
|
+
* Make `locals` argument required on `ActionView::Template#initialize`.
|
351
176
|
|
352
|
-
*
|
177
|
+
*Rafael Mendonça França*
|
353
178
|
|
354
|
-
*
|
355
|
-
original URL is using the hexadecimal lowercased.
|
179
|
+
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
356
180
|
|
357
181
|
*Rafael Mendonça França*
|
358
182
|
|
359
|
-
*
|
360
|
-
value.
|
183
|
+
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
361
184
|
|
362
|
-
|
363
|
-
|
364
|
-
f.text_field :field, value: nil #=> <input value="">
|
365
|
-
f.text_area :field, value: nil #=> <textarea>value of field</textarea>
|
185
|
+
*Rafael Mendonça França*
|
366
186
|
|
367
|
-
|
187
|
+
* Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
|
368
188
|
|
369
|
-
|
189
|
+
*Rafael Mendonça França*
|
370
190
|
|
371
|
-
|
191
|
+
* Remove deprecated support to passing absolute paths to `render template:`.
|
372
192
|
|
373
|
-
*
|
374
|
-
as the last element of the array.
|
193
|
+
*Rafael Mendonça França*
|
375
194
|
|
376
|
-
|
377
|
-
[["North America", [['United States','US'],"Canada"], data: { foo: 'bar' }]]
|
378
|
-
)
|
195
|
+
* Remove deprecated support to passing relative paths to `render file:`.
|
379
196
|
|
380
|
-
*
|
197
|
+
*Rafael Mendonça França*
|
381
198
|
|
382
|
-
*
|
383
|
-
It should return :html. Fix #11393.
|
199
|
+
* Remove support to template handlers that don't accept two arguments.
|
384
200
|
|
385
|
-
*
|
201
|
+
*Rafael Mendonça França*
|
386
202
|
|
387
|
-
*
|
203
|
+
* Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
|
388
204
|
|
389
|
-
|
205
|
+
*Rafael Mendonça França*
|
390
206
|
|
391
|
-
|
392
|
-
# => "<a action=\"bar\" controller=\"foo\"><span>Example site</span></a>"
|
207
|
+
* Remove deprecated support to call private methods from object in some view helpers.
|
393
208
|
|
394
|
-
|
209
|
+
*Rafael Mendonça França*
|
395
210
|
|
396
|
-
|
397
|
-
|
211
|
+
* `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
|
212
|
+
the translated text and the fully resolved translation key:
|
398
213
|
|
399
|
-
|
214
|
+
<%= translate(".relative_key") do |translation, resolved_key| %>
|
215
|
+
<span title="<%= resolved_key %>"><%= translation %></span>
|
216
|
+
<% end %>
|
400
217
|
|
401
|
-
*
|
218
|
+
*Sean Doyle*
|
402
219
|
|
403
|
-
|
220
|
+
* Ensure cache fragment digests include all relevant template dependencies when
|
221
|
+
fragments are contained in a block passed to the render helper. Remove the
|
222
|
+
virtual_path keyword arguments found in CacheHelper as they no longer possess
|
223
|
+
any function following 1581cab.
|
404
224
|
|
405
|
-
|
225
|
+
Fixes #38984.
|
406
226
|
|
407
|
-
*
|
227
|
+
*Aaron Lipman*
|
408
228
|
|
409
|
-
|
410
|
-
|
229
|
+
* Deprecate `config.action_view.raise_on_missing_translations` in favor of
|
230
|
+
`config.i18n.raise_on_missing_translations`.
|
411
231
|
|
412
|
-
|
232
|
+
New generalized configuration option now determines whether an error should be raised
|
233
|
+
for missing translations in controllers and views.
|
413
234
|
|
414
|
-
|
415
|
-
# => '<form>..<input name="utf8" type="hidden" value="✓" />..</form>'
|
235
|
+
*fatkodima*
|
416
236
|
|
417
|
-
|
237
|
+
* Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
|
238
|
+
and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
|
418
239
|
|
419
|
-
|
420
|
-
# => '<form>..<input name="utf8" type="hidden" value="✓" />..</form>'
|
240
|
+
*Zach Kemp*
|
421
241
|
|
422
|
-
|
423
|
-
# => '<form>....</form>'
|
242
|
+
* `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
|
424
243
|
|
425
|
-
*
|
244
|
+
*Joel Hawksley*, *Aaron Patterson*
|
426
245
|
|
427
|
-
*
|
428
|
-
|
246
|
+
* `ActionView::Helpers::TranslationHelper#translate` returns nil when
|
247
|
+
passed `default: nil` without a translation matching `I18n#translate`.
|
429
248
|
|
430
|
-
*
|
249
|
+
*Stefan Wrobel*
|
431
250
|
|
432
|
-
*
|
251
|
+
* `OptimizedFileSystemResolver` prefers template details in order of locale,
|
252
|
+
formats, variants, handlers.
|
433
253
|
|
434
|
-
*
|
254
|
+
*Iago Pimenta*
|
435
255
|
|
436
|
-
*
|
437
|
-
allowing use of symbol keys with helpers.
|
256
|
+
* Added `class_names` helper to create a CSS class value with conditional classes.
|
438
257
|
|
439
|
-
*
|
258
|
+
*Joel Hawksley*, *Aaron Patterson*
|
440
259
|
|
441
|
-
*
|
442
|
-
pass in a `:prompt` hash option to use this feature.
|
260
|
+
* Add support for conditional values to TagBuilder.
|
443
261
|
|
444
|
-
*
|
262
|
+
*Joel Hawksley*
|
445
263
|
|
446
|
-
*
|
264
|
+
* `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
|
447
265
|
|
448
|
-
|
266
|
+
```ruby
|
267
|
+
@post = Post.new
|
268
|
+
@post.category = nil
|
449
269
|
|
450
|
-
|
451
|
-
|
270
|
+
# Before
|
271
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
272
|
+
# =>
|
273
|
+
# <select name="post[category]" id="post_category">
|
274
|
+
# <option value="">none</option>
|
275
|
+
# <option value="1">programming</option>
|
276
|
+
# <option value="2">economics</option>
|
277
|
+
# </select>
|
452
278
|
|
453
|
-
After
|
279
|
+
# After
|
280
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
281
|
+
# =>
|
282
|
+
# <select name="post[category]" id="post_category">
|
283
|
+
# <option selected="selected" value="">none</option>
|
284
|
+
# <option value="1">programming</option>
|
285
|
+
# <option value="2">economics</option>
|
286
|
+
# </select>
|
287
|
+
```
|
454
288
|
|
455
|
-
|
456
|
-
# => "<b>Showing</b>"
|
289
|
+
*bogdanvlviv*
|
457
290
|
|
458
|
-
|
291
|
+
* Log lines for partial renders and started template renders are now
|
292
|
+
emitted at the `DEBUG` level instead of `INFO`.
|
459
293
|
|
460
|
-
|
294
|
+
Completed template renders are still logged at the `INFO` level.
|
461
295
|
|
462
|
-
|
463
|
-
was generating different URIs.
|
296
|
+
*DHH*
|
464
297
|
|
465
|
-
|
298
|
+
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
466
299
|
|
467
|
-
|
468
|
-
# => "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />"
|
469
|
-
image_tag("http://google.com")
|
470
|
-
# => "<img alt=\"Google\" src=\"http://google.com\" />"
|
300
|
+
*Juanito Fatas*
|
471
301
|
|
472
|
-
|
302
|
+
* Added `phone_to` helper method to create a link from mobile numbers.
|
473
303
|
|
474
|
-
|
475
|
-
# => "<img alt=\"Google\" src=\"HTTP://google.com\" />"
|
476
|
-
image_tag("http://google.com")
|
477
|
-
# => "<img alt=\"Google\" src=\"http://google.com\" />"
|
304
|
+
*Pietro Moro*
|
478
305
|
|
479
|
-
|
306
|
+
* annotated_source_code returns an empty array so TemplateErrors without a
|
307
|
+
template in the backtrace are surfaced properly by DebugExceptions.
|
480
308
|
|
481
|
-
*
|
482
|
-
optionally contain html attributes as the last element of the array.
|
309
|
+
*Guilherme Mansur*, *Kasper Timm Hansen*
|
483
310
|
|
484
|
-
|
311
|
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
485
312
|
|
486
|
-
*
|
487
|
-
to conform to the latest HTML 5.1 spec. Add attributes `allowfullscreen`,
|
488
|
-
`default`, `inert`, `sortable`, `truespeed`, `typemustmatch`. Fix attribute
|
489
|
-
`seamless` (previously misspelled `seemless`).
|
313
|
+
*Guilherme Mansur*, *Gannon McGibbon*
|
490
314
|
|
491
|
-
|
315
|
+
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
|
492
316
|
|
493
|
-
*
|
494
|
-
being digested for cache dependencies.
|
317
|
+
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
495
318
|
|
496
|
-
|
319
|
+
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
497
320
|
|
498
|
-
*
|
321
|
+
*Younes SERRAJ*
|
499
322
|
|
500
|
-
*Piotr Sarnacki*, *Łukasz Strzałkowski*
|
501
323
|
|
502
|
-
Please check [
|
324
|
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.
|