actionview 5.1.4 → 6.1.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 +199 -168
- data/MIT-LICENSE +1 -1
- data/README.rdoc +7 -5
- data/lib/action_view.rb +10 -4
- data/lib/action_view/base.rb +87 -23
- data/lib/action_view/buffers.rb +17 -0
- data/lib/action_view/cache_expiry.rb +52 -0
- data/lib/action_view/context.rb +7 -11
- data/lib/action_view/dependency_tracker.rb +12 -4
- data/lib/action_view/digestor.rb +24 -23
- data/lib/action_view/flows.rb +2 -1
- data/lib/action_view/gem_version.rb +4 -2
- data/lib/action_view/helpers.rb +4 -2
- data/lib/action_view/helpers/active_model_helper.rb +9 -4
- data/lib/action_view/helpers/asset_tag_helper.rb +220 -57
- data/lib/action_view/helpers/asset_url_helper.rb +28 -23
- data/lib/action_view/helpers/atom_feed_helper.rb +5 -2
- data/lib/action_view/helpers/cache_helper.rb +39 -28
- data/lib/action_view/helpers/capture_helper.rb +13 -7
- data/lib/action_view/helpers/controller_helper.rb +3 -1
- data/lib/action_view/helpers/csp_helper.rb +26 -0
- data/lib/action_view/helpers/csrf_helper.rb +5 -3
- data/lib/action_view/helpers/date_helper.rb +78 -33
- data/lib/action_view/helpers/debug_helper.rb +4 -2
- data/lib/action_view/helpers/form_helper.rb +357 -106
- data/lib/action_view/helpers/form_options_helper.rb +45 -39
- data/lib/action_view/helpers/form_tag_helper.rb +42 -27
- data/lib/action_view/helpers/javascript_helper.rb +28 -12
- data/lib/action_view/helpers/number_helper.rb +16 -8
- data/lib/action_view/helpers/output_safety_helper.rb +3 -1
- data/lib/action_view/helpers/rendering_helper.rb +20 -9
- data/lib/action_view/helpers/sanitize_helper.rb +15 -19
- data/lib/action_view/helpers/tag_helper.rb +100 -24
- data/lib/action_view/helpers/tags.rb +3 -1
- data/lib/action_view/helpers/tags/base.rb +30 -21
- data/lib/action_view/helpers/tags/check_box.rb +3 -2
- data/lib/action_view/helpers/tags/checkable.rb +4 -2
- data/lib/action_view/helpers/tags/collection_check_boxes.rb +2 -1
- data/lib/action_view/helpers/tags/collection_helpers.rb +2 -1
- data/lib/action_view/helpers/tags/collection_radio_buttons.rb +2 -1
- data/lib/action_view/helpers/tags/collection_select.rb +3 -1
- 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 +5 -4
- data/lib/action_view/helpers/tags/datetime_field.rb +3 -2
- 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 +3 -1
- data/lib/action_view/helpers/tags/hidden_field.rb +2 -0
- data/lib/action_view/helpers/tags/label.rb +6 -5
- 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 +2 -0
- data/lib/action_view/helpers/tags/placeholderable.rb +2 -0
- data/lib/action_view/helpers/tags/radio_button.rb +3 -2
- data/lib/action_view/helpers/tags/range_field.rb +2 -0
- data/lib/action_view/helpers/tags/search_field.rb +2 -0
- data/lib/action_view/helpers/tags/select.rb +4 -3
- data/lib/action_view/helpers/tags/tel_field.rb +2 -0
- data/lib/action_view/helpers/tags/text_area.rb +3 -1
- data/lib/action_view/helpers/tags/text_field.rb +3 -2
- 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 +3 -6
- 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/text_helper.rb +11 -10
- data/lib/action_view/helpers/translation_helper.rb +102 -52
- data/lib/action_view/helpers/url_helper.rb +150 -32
- data/lib/action_view/layouts.rb +15 -15
- data/lib/action_view/log_subscriber.rb +32 -15
- data/lib/action_view/lookup_context.rb +67 -39
- data/lib/action_view/model_naming.rb +2 -0
- data/lib/action_view/path_set.rb +5 -12
- data/lib/action_view/railtie.rb +46 -21
- data/lib/action_view/record_identifier.rb +4 -3
- data/lib/action_view/renderer/abstract_renderer.rb +144 -11
- data/lib/action_view/renderer/collection_renderer.rb +196 -0
- data/lib/action_view/renderer/object_renderer.rb +34 -0
- data/lib/action_view/renderer/partial_renderer.rb +33 -283
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +64 -17
- data/lib/action_view/renderer/renderer.rb +61 -4
- data/lib/action_view/renderer/streaming_template_renderer.rb +14 -8
- data/lib/action_view/renderer/template_renderer.rb +36 -26
- data/lib/action_view/rendering.rb +57 -38
- data/lib/action_view/routing_url_for.rb +15 -12
- data/lib/action_view/tasks/cache_digests.rake +2 -0
- data/lib/action_view/template.rb +69 -76
- data/lib/action_view/template/error.rb +32 -18
- data/lib/action_view/template/handlers.rb +4 -2
- data/lib/action_view/template/handlers/builder.rb +5 -6
- data/lib/action_view/template/handlers/erb.rb +20 -19
- data/lib/action_view/template/handlers/erb/erubi.rb +17 -9
- data/lib/action_view/template/handlers/html.rb +3 -1
- data/lib/action_view/template/handlers/raw.rb +4 -2
- data/lib/action_view/template/html.rb +8 -7
- 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 +194 -152
- data/lib/action_view/template/sources.rb +13 -0
- data/lib/action_view/template/sources/file.rb +17 -0
- data/lib/action_view/template/text.rb +5 -4
- data/lib/action_view/template/types.rb +3 -1
- data/lib/action_view/test_case.rb +38 -30
- data/lib/action_view/testing/resolvers.rb +20 -27
- data/lib/action_view/unbound_template.rb +31 -0
- data/lib/action_view/version.rb +2 -0
- data/lib/action_view/view_paths.rb +61 -40
- data/lib/assets/compiled/rails-ujs.js +84 -23
- metadata +34 -23
- data/lib/action_view/helpers/record_tag_helper.rb +0 -21
- data/lib/action_view/template/handlers/erb/deprecated_erubis.rb +0 -9
- data/lib/action_view/template/handlers/erb/erubis.rb +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a164a5f7ce09e84dfab86b45a2df631dc782f50fc22c0cbb92f967c95808de63
|
4
|
+
data.tar.gz: 9dd5e8614c436054ebb785df67171b16deb22bb8be3518d57ee8486613919d86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3502d7dd7b2407ce4634afadcd61b2d654f248d91bf85d9f43bd6b1ad150fdd84a45b6f009a04d899be293d123be503a7e497b761c10a576bea6c9248140f599
|
7
|
+
data.tar.gz: 3b0695d10e6939424bf14a8cbcea85f6628de02d0a4de37266213883604be8a95daf65eb435cf32260dae4d8b8ad562af7c37a3b426a2589fd305056ec381361
|
data/CHANGELOG.md
CHANGED
@@ -1,273 +1,304 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
2
2
|
|
3
|
-
*
|
3
|
+
* Fix lazy translation in partial with block.
|
4
4
|
|
5
|
+
*Marek Kasztelnik*
|
5
6
|
|
6
|
-
|
7
|
+
* Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
|
7
8
|
|
8
|
-
*
|
9
|
+
*aar0nr*
|
9
10
|
|
11
|
+
* Link preloading keep integrity hashes in the header.
|
10
12
|
|
11
|
-
|
13
|
+
*Étienne Barrié*
|
12
14
|
|
13
|
-
*
|
15
|
+
* Add `config.action_view.preload_links_header` to allow disabling of
|
16
|
+
the `Link` header being added by default when using `stylesheet_link_tag`
|
17
|
+
and `javascript_include_tag`.
|
14
18
|
|
19
|
+
*Andrew White*
|
15
20
|
|
16
|
-
|
21
|
+
* The `translate` helper now resolves `default` values when a `nil` key is
|
22
|
+
specified, instead of always returning `nil`.
|
17
23
|
|
18
|
-
*
|
24
|
+
*Jonathan Hefner*
|
19
25
|
|
20
26
|
|
21
|
-
## Rails
|
27
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
22
28
|
|
23
|
-
*
|
29
|
+
* SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
|
30
|
+
call safe_list_sanitizer's class method
|
24
31
|
|
32
|
+
Fixes #39586
|
25
33
|
|
26
|
-
|
34
|
+
*Taufiq Muhammadi*
|
27
35
|
|
28
|
-
*
|
36
|
+
* Change form_with to generate non-remote forms by default.
|
29
37
|
|
38
|
+
`form_with` would generate a remote form by default. This would confuse
|
39
|
+
users because they were forced to handle remote requests.
|
30
40
|
|
31
|
-
|
41
|
+
All new 6.1 applications will generate non-remote forms by default.
|
42
|
+
When upgrading a 6.0 application you can enable remote forms by default by
|
43
|
+
setting `config.action_view.form_with_generates_remote_forms` to `true`.
|
32
44
|
|
33
|
-
*
|
34
|
-
|
35
|
-
Fixes #29401.
|
36
|
-
|
37
|
-
*Nikita Savrov*
|
38
|
-
|
39
|
-
* Generate field ids in `collection_check_boxes` and `collection_radio_buttons`.
|
45
|
+
*Petrik de Heus*
|
40
46
|
|
41
|
-
|
47
|
+
* Yield translated strings to calls of `ActionView::FormBuilder#button`
|
48
|
+
when a block is given.
|
42
49
|
|
43
|
-
|
50
|
+
*Sean Doyle*
|
44
51
|
|
45
|
-
|
52
|
+
* Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
|
53
|
+
`#to_s` so that `form.label` calls can yield that value to their blocks.
|
46
54
|
|
47
|
-
*
|
48
|
-
for bad input.
|
55
|
+
*Sean Doyle*
|
49
56
|
|
50
|
-
|
57
|
+
* Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
|
58
|
+
and make the original available as an alias.
|
51
59
|
|
60
|
+
token_list("foo", "foo bar")
|
61
|
+
# => "foo bar"
|
52
62
|
|
53
|
-
|
63
|
+
*Sean Doyle*
|
54
64
|
|
55
|
-
*
|
65
|
+
* ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
|
66
|
+
values. This is useful when declaring lists of label text identifiers in
|
67
|
+
`aria-labelledby` or `aria-describedby`.
|
56
68
|
|
69
|
+
tag.input type: 'checkbox', name: 'published', aria: {
|
70
|
+
invalid: @post.errors[:published].any?,
|
71
|
+
labelledby: ['published_context', 'published_label'],
|
72
|
+
describedby: { published_errors: @post.errors[:published].any? }
|
73
|
+
}
|
74
|
+
#=> <input
|
75
|
+
type="checkbox" name="published" aria-invalid="true"
|
76
|
+
aria-labelledby="published_context published_label"
|
77
|
+
aria-describedby="published_errors"
|
78
|
+
>
|
57
79
|
|
58
|
-
|
80
|
+
*Sean Doyle*
|
59
81
|
|
60
|
-
* Remove
|
82
|
+
* Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
|
61
83
|
|
62
|
-
|
63
|
-
`encode_special_chars` option.
|
84
|
+
*Rafael Mendonça França*
|
64
85
|
|
65
|
-
|
86
|
+
* Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
|
66
87
|
|
67
|
-
*
|
88
|
+
*Rafael Mendonça França*
|
68
89
|
|
69
|
-
*
|
90
|
+
* Remove deprecated `formats` from `ActionView::Template::HTML`.
|
70
91
|
|
71
|
-
|
72
|
-
Plus it supports `--enable-frozen-string-literal` in Ruby 2.3+.
|
92
|
+
*Rafael Mendonça França*
|
73
93
|
|
74
|
-
|
75
|
-
These were an unused, undocumented side effect of the Erubis
|
76
|
-
implementation.
|
94
|
+
* Remove deprecated `formats` from `ActionView::Template::RawFile`.
|
77
95
|
|
78
|
-
|
79
|
-
handful of folks using it directly.
|
96
|
+
*Rafael Mendonça França*
|
80
97
|
|
81
|
-
|
98
|
+
* Remove deprecated `formats` from `ActionView::Template::Text`.
|
82
99
|
|
83
|
-
*
|
100
|
+
*Rafael Mendonça França*
|
84
101
|
|
85
|
-
|
102
|
+
* Remove deprecated `find_file` from `ActionView::PathSet`.
|
86
103
|
|
87
|
-
*
|
104
|
+
*Rafael Mendonça França*
|
88
105
|
|
89
|
-
*
|
106
|
+
* Remove deprecated `rendered_format` from `ActionView::LookupContext`.
|
90
107
|
|
91
|
-
*
|
108
|
+
*Rafael Mendonça França*
|
92
109
|
|
93
|
-
*
|
110
|
+
* Remove deprecated `find_file` from `ActionView::ViewPaths`.
|
94
111
|
|
95
|
-
|
112
|
+
*Rafael Mendonça França*
|
96
113
|
|
97
|
-
|
114
|
+
* Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
|
98
115
|
|
99
|
-
*
|
100
|
-
to enable template recompilation.
|
116
|
+
*Rafael Mendonça França*
|
101
117
|
|
102
|
-
|
103
|
-
|
118
|
+
* Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
|
119
|
+
in `ActionView::Base#initialize`.
|
104
120
|
|
105
|
-
*
|
121
|
+
*Rafael Mendonça França*
|
106
122
|
|
107
|
-
*
|
123
|
+
* Remove deprecated `format` argument `ActionView::Base#initialize`.
|
108
124
|
|
109
|
-
|
125
|
+
*Rafael Mendonça França*
|
110
126
|
|
111
|
-
|
112
|
-
<%= form_with scope: :post, url: super_special_posts_path %>
|
113
|
-
```
|
127
|
+
* Remove deprecated `ActionView::Template#refresh`.
|
114
128
|
|
115
|
-
|
129
|
+
*Rafael Mendonça França*
|
116
130
|
|
117
|
-
|
118
|
-
<%= form_with model: @post do |form| %>
|
119
|
-
<%= form.text_field :title %>
|
120
|
-
<% end %>
|
121
|
-
```
|
131
|
+
* Remove deprecated `ActionView::Template#original_encoding`.
|
122
132
|
|
123
|
-
*
|
133
|
+
*Rafael Mendonça França*
|
124
134
|
|
125
|
-
*
|
135
|
+
* Remove deprecated `ActionView::Template#variants`.
|
126
136
|
|
127
|
-
|
128
|
-
<%= fields :comment, model: @comment do |fields| %>
|
129
|
-
<%= fields.text_field :title %>
|
130
|
-
<% end %>
|
131
|
-
```
|
137
|
+
*Rafael Mendonça França*
|
132
138
|
|
133
|
-
|
139
|
+
* Remove deprecated `ActionView::Template#formats`.
|
134
140
|
|
135
|
-
*
|
141
|
+
*Rafael Mendonça França*
|
136
142
|
|
137
|
-
*
|
143
|
+
* Remove deprecated `ActionView::Template#virtual_path=`.
|
138
144
|
|
139
145
|
*Rafael Mendonça França*
|
140
146
|
|
141
|
-
*
|
147
|
+
* Remove deprecated `ActionView::Template#updated_at`.
|
142
148
|
|
143
|
-
|
144
|
-
will still be available in `local_assigns`.
|
149
|
+
*Rafael Mendonça França*
|
145
150
|
|
146
|
-
|
151
|
+
* Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
|
147
152
|
|
148
|
-
|
149
|
-
<%= render "example", class: "text-center", message: "Hello world!" %>
|
153
|
+
*Rafael Mendonça França*
|
150
154
|
|
151
|
-
|
152
|
-
<%= tag.div class: local_assigns[:class] do %>
|
153
|
-
<p><%= message %></p>
|
154
|
-
<% end %>
|
155
|
-
```
|
155
|
+
* Make `locals` argument required on `ActionView::Template#initialize`.
|
156
156
|
|
157
|
-
*
|
157
|
+
*Rafael Mendonça França*
|
158
158
|
|
159
|
-
*
|
159
|
+
* Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
|
160
160
|
|
161
|
-
|
162
|
-
`image_tag` and `audio_tag` now accept a `:skip_pipeline` option which can
|
163
|
-
be set to true to bypass the asset pipeline and serve the assets from the
|
164
|
-
public folder.
|
161
|
+
*Rafael Mendonça França*
|
165
162
|
|
166
|
-
|
163
|
+
* Remove deprecated `config.action_view.finalize_compiled_template_methods`
|
167
164
|
|
168
|
-
*
|
165
|
+
*Rafael Mendonça França*
|
169
166
|
|
170
|
-
|
171
|
-
in combination with the `:poster` option to bypass the asset pipeline and
|
172
|
-
serve the poster image for the video from the public folder.
|
167
|
+
* Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
|
173
168
|
|
174
|
-
*
|
169
|
+
*Rafael Mendonça França*
|
175
170
|
|
176
|
-
*
|
171
|
+
* Remove deprecated support to passing absolute paths to `render template:`.
|
177
172
|
|
178
|
-
|
179
|
-
the cache:
|
173
|
+
*Rafael Mendonça França*
|
180
174
|
|
181
|
-
|
182
|
-
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
|
183
|
-
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
|
184
|
-
```
|
175
|
+
* Remove deprecated support to passing relative paths to `render file:`.
|
185
176
|
|
186
|
-
|
177
|
+
*Rafael Mendonça França*
|
187
178
|
|
188
|
-
|
189
|
-
Read fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/d0bdf2974e1ef6d31685c3b392ad0b74 (0.6ms)
|
190
|
-
Rendered messages/_message.html.erb in 1.2 ms [cache hit]
|
191
|
-
Write fragment views/v1/2914079/v1/2914079/recordings/70182313-20160225015037000000/3b4e249ac9d168c617e32e84b99218b5 (1.1ms)
|
192
|
-
Rendered recordings/threads/_thread.html.erb in 1.5 ms [cache miss]
|
193
|
-
```
|
179
|
+
* Remove support to template handlers that don't accept two arguments.
|
194
180
|
|
195
|
-
|
196
|
-
`config.action_controller.enable_fragment_cache_logging = true`.
|
181
|
+
*Rafael Mendonça França*
|
197
182
|
|
198
|
-
|
183
|
+
* Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
|
199
184
|
|
200
|
-
*
|
201
|
-
implement `to_a`.
|
185
|
+
*Rafael Mendonça França*
|
202
186
|
|
203
|
-
|
204
|
-
queries of ActiveRecord Relations by calling `#to_ary` on the given
|
205
|
-
collection. Instances of `Enumerator` or `Enumerable` are valid
|
206
|
-
collections, but they do not implement `#to_ary`. By changing this to
|
207
|
-
`#to_a`, they will now be extracted and rendered as expected.
|
187
|
+
* Remove deprecated support to call private methods from object in some view helpers.
|
208
188
|
|
209
|
-
*
|
189
|
+
*Rafael Mendonça França*
|
210
190
|
|
211
|
-
*
|
212
|
-
|
191
|
+
* `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
|
192
|
+
the translated text and the fully resolved translation key:
|
213
193
|
|
214
|
-
|
215
|
-
|
216
|
-
|
194
|
+
<%= translate(".relative_key") do |translation, resolved_key| %>
|
195
|
+
<span title="<%= resolved_key %>"><%= translation %></span>
|
196
|
+
<% end %>
|
217
197
|
|
218
|
-
|
219
|
-
Hello world!
|
220
|
-
<% end -%>
|
221
|
-
```
|
198
|
+
*Sean Doyle*
|
222
199
|
|
223
|
-
|
200
|
+
* Ensure cache fragment digests include all relevant template dependencies when
|
201
|
+
fragments are contained in a block passed to the render helper. Remove the
|
202
|
+
virtual_path keyword arguments found in CacheHelper as they no longer possess
|
203
|
+
any function following 1581cab.
|
224
204
|
|
225
|
-
|
226
|
-
tag.br
|
227
|
-
tag.div tag.p("Hello world!"), class: "strong"
|
205
|
+
Fixes #38984.
|
228
206
|
|
229
|
-
|
230
|
-
Hello world!
|
231
|
-
<% end %>
|
232
|
-
```
|
207
|
+
*Aaron Lipman*
|
233
208
|
|
234
|
-
|
209
|
+
* Deprecate `config.action_view.raise_on_missing_translations` in favor of
|
210
|
+
`config.i18n.raise_on_missing_translations`.
|
235
211
|
|
236
|
-
|
212
|
+
New generalized configuration option now determines whether an error should be raised
|
213
|
+
for missing translations in controllers and views.
|
237
214
|
|
238
|
-
|
239
|
-
and it is recommended to use `datetime-local`.
|
240
|
-
Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
|
215
|
+
*fatkodima*
|
241
216
|
|
242
|
-
|
217
|
+
* Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
|
218
|
+
and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
|
243
219
|
|
244
|
-
*
|
245
|
-
HTML-safe strings.
|
220
|
+
*Zach Kemp*
|
246
221
|
|
247
|
-
|
248
|
-
the ERB template handler escaped strings by default this broke some applications that
|
249
|
-
expected plain JS or HTML files to be rendered unescaped. This fixes the issue caused
|
250
|
-
by changing the default handler by changing the Raw template handler to output HTML-safe
|
251
|
-
strings.
|
222
|
+
* `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
|
252
223
|
|
253
|
-
*
|
224
|
+
*Joel Hawksley*, *Aaron Patterson*
|
254
225
|
|
255
|
-
* `
|
256
|
-
|
257
|
-
Ref: https://www.w3.org/TR/html5/forms.html#the-option-element.
|
226
|
+
* `ActionView::Helpers::TranslationHelper#translate` returns nil when
|
227
|
+
passed `default: nil` without a translation matching `I18n#translate`.
|
258
228
|
|
259
|
-
|
229
|
+
*Stefan Wrobel*
|
260
230
|
|
261
|
-
|
262
|
-
|
263
|
-
|
231
|
+
* `OptimizedFileSystemResolver` prefers template details in order of locale,
|
232
|
+
formats, variants, handlers.
|
233
|
+
|
234
|
+
*Iago Pimenta*
|
235
|
+
|
236
|
+
* Added `class_names` helper to create a CSS class value with conditional classes.
|
237
|
+
|
238
|
+
*Joel Hawksley*, *Aaron Patterson*
|
264
239
|
|
265
|
-
|
240
|
+
* Add support for conditional values to TagBuilder.
|
266
241
|
|
267
|
-
|
268
|
-
|
242
|
+
*Joel Hawksley*
|
243
|
+
|
244
|
+
* `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
|
245
|
+
|
246
|
+
```ruby
|
247
|
+
@post = Post.new
|
248
|
+
@post.category = nil
|
249
|
+
|
250
|
+
# Before
|
251
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
252
|
+
# =>
|
253
|
+
# <select name="post[category]" id="post_category">
|
254
|
+
# <option value="">none</option>
|
255
|
+
# <option value="1">programming</option>
|
256
|
+
# <option value="2">economics</option>
|
257
|
+
# </select>
|
258
|
+
|
259
|
+
# After
|
260
|
+
select("post", "category", none: nil, programming: 1, economics: 2)
|
261
|
+
# =>
|
262
|
+
# <select name="post[category]" id="post_category">
|
263
|
+
# <option selected="selected" value="">none</option>
|
264
|
+
# <option value="1">programming</option>
|
265
|
+
# <option value="2">economics</option>
|
266
|
+
# </select>
|
269
267
|
```
|
270
268
|
|
271
|
-
*
|
269
|
+
*bogdanvlviv*
|
270
|
+
|
271
|
+
* Log lines for partial renders and started template renders are now
|
272
|
+
emitted at the `DEBUG` level instead of `INFO`.
|
273
|
+
|
274
|
+
Completed template renders are still logged at the `INFO` level.
|
275
|
+
|
276
|
+
*DHH*
|
277
|
+
|
278
|
+
* ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
|
279
|
+
|
280
|
+
*Juanito Fatas*
|
281
|
+
|
282
|
+
* Added `phone_to` helper method to create a link from mobile numbers.
|
283
|
+
|
284
|
+
*Pietro Moro*
|
285
|
+
|
286
|
+
* annotated_source_code returns an empty array so TemplateErrors without a
|
287
|
+
template in the backtrace are surfaced properly by DebugExceptions.
|
288
|
+
|
289
|
+
*Guilherme Mansur*, *Kasper Timm Hansen*
|
290
|
+
|
291
|
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
292
|
+
|
293
|
+
*Guilherme Mansur*, *Gannon McGibbon*
|
294
|
+
|
295
|
+
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
|
296
|
+
|
297
|
+
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
298
|
+
|
299
|
+
* Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
|
300
|
+
|
301
|
+
*Younes SERRAJ*
|
302
|
+
|
272
303
|
|
273
|
-
Please check [
|
304
|
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.
|