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.

Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +199 -168
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +7 -5
  5. data/lib/action_view.rb +10 -4
  6. data/lib/action_view/base.rb +87 -23
  7. data/lib/action_view/buffers.rb +17 -0
  8. data/lib/action_view/cache_expiry.rb +52 -0
  9. data/lib/action_view/context.rb +7 -11
  10. data/lib/action_view/dependency_tracker.rb +12 -4
  11. data/lib/action_view/digestor.rb +24 -23
  12. data/lib/action_view/flows.rb +2 -1
  13. data/lib/action_view/gem_version.rb +4 -2
  14. data/lib/action_view/helpers.rb +4 -2
  15. data/lib/action_view/helpers/active_model_helper.rb +9 -4
  16. data/lib/action_view/helpers/asset_tag_helper.rb +220 -57
  17. data/lib/action_view/helpers/asset_url_helper.rb +28 -23
  18. data/lib/action_view/helpers/atom_feed_helper.rb +5 -2
  19. data/lib/action_view/helpers/cache_helper.rb +39 -28
  20. data/lib/action_view/helpers/capture_helper.rb +13 -7
  21. data/lib/action_view/helpers/controller_helper.rb +3 -1
  22. data/lib/action_view/helpers/csp_helper.rb +26 -0
  23. data/lib/action_view/helpers/csrf_helper.rb +5 -3
  24. data/lib/action_view/helpers/date_helper.rb +78 -33
  25. data/lib/action_view/helpers/debug_helper.rb +4 -2
  26. data/lib/action_view/helpers/form_helper.rb +357 -106
  27. data/lib/action_view/helpers/form_options_helper.rb +45 -39
  28. data/lib/action_view/helpers/form_tag_helper.rb +42 -27
  29. data/lib/action_view/helpers/javascript_helper.rb +28 -12
  30. data/lib/action_view/helpers/number_helper.rb +16 -8
  31. data/lib/action_view/helpers/output_safety_helper.rb +3 -1
  32. data/lib/action_view/helpers/rendering_helper.rb +20 -9
  33. data/lib/action_view/helpers/sanitize_helper.rb +15 -19
  34. data/lib/action_view/helpers/tag_helper.rb +100 -24
  35. data/lib/action_view/helpers/tags.rb +3 -1
  36. data/lib/action_view/helpers/tags/base.rb +30 -21
  37. data/lib/action_view/helpers/tags/check_box.rb +3 -2
  38. data/lib/action_view/helpers/tags/checkable.rb +4 -2
  39. data/lib/action_view/helpers/tags/collection_check_boxes.rb +2 -1
  40. data/lib/action_view/helpers/tags/collection_helpers.rb +2 -1
  41. data/lib/action_view/helpers/tags/collection_radio_buttons.rb +2 -1
  42. data/lib/action_view/helpers/tags/collection_select.rb +3 -1
  43. data/lib/action_view/helpers/tags/color_field.rb +4 -3
  44. data/lib/action_view/helpers/tags/date_field.rb +3 -2
  45. data/lib/action_view/helpers/tags/date_select.rb +5 -4
  46. data/lib/action_view/helpers/tags/datetime_field.rb +3 -2
  47. data/lib/action_view/helpers/tags/datetime_local_field.rb +3 -2
  48. data/lib/action_view/helpers/tags/datetime_select.rb +2 -0
  49. data/lib/action_view/helpers/tags/email_field.rb +2 -0
  50. data/lib/action_view/helpers/tags/file_field.rb +2 -0
  51. data/lib/action_view/helpers/tags/grouped_collection_select.rb +3 -1
  52. data/lib/action_view/helpers/tags/hidden_field.rb +2 -0
  53. data/lib/action_view/helpers/tags/label.rb +6 -5
  54. data/lib/action_view/helpers/tags/month_field.rb +3 -2
  55. data/lib/action_view/helpers/tags/number_field.rb +2 -0
  56. data/lib/action_view/helpers/tags/password_field.rb +2 -0
  57. data/lib/action_view/helpers/tags/placeholderable.rb +2 -0
  58. data/lib/action_view/helpers/tags/radio_button.rb +3 -2
  59. data/lib/action_view/helpers/tags/range_field.rb +2 -0
  60. data/lib/action_view/helpers/tags/search_field.rb +2 -0
  61. data/lib/action_view/helpers/tags/select.rb +4 -3
  62. data/lib/action_view/helpers/tags/tel_field.rb +2 -0
  63. data/lib/action_view/helpers/tags/text_area.rb +3 -1
  64. data/lib/action_view/helpers/tags/text_field.rb +3 -2
  65. data/lib/action_view/helpers/tags/time_field.rb +3 -2
  66. data/lib/action_view/helpers/tags/time_select.rb +2 -0
  67. data/lib/action_view/helpers/tags/time_zone_select.rb +3 -1
  68. data/lib/action_view/helpers/tags/translator.rb +3 -6
  69. data/lib/action_view/helpers/tags/url_field.rb +2 -0
  70. data/lib/action_view/helpers/tags/week_field.rb +3 -2
  71. data/lib/action_view/helpers/text_helper.rb +11 -10
  72. data/lib/action_view/helpers/translation_helper.rb +102 -52
  73. data/lib/action_view/helpers/url_helper.rb +150 -32
  74. data/lib/action_view/layouts.rb +15 -15
  75. data/lib/action_view/log_subscriber.rb +32 -15
  76. data/lib/action_view/lookup_context.rb +67 -39
  77. data/lib/action_view/model_naming.rb +2 -0
  78. data/lib/action_view/path_set.rb +5 -12
  79. data/lib/action_view/railtie.rb +46 -21
  80. data/lib/action_view/record_identifier.rb +4 -3
  81. data/lib/action_view/renderer/abstract_renderer.rb +144 -11
  82. data/lib/action_view/renderer/collection_renderer.rb +196 -0
  83. data/lib/action_view/renderer/object_renderer.rb +34 -0
  84. data/lib/action_view/renderer/partial_renderer.rb +33 -283
  85. data/lib/action_view/renderer/partial_renderer/collection_caching.rb +64 -17
  86. data/lib/action_view/renderer/renderer.rb +61 -4
  87. data/lib/action_view/renderer/streaming_template_renderer.rb +14 -8
  88. data/lib/action_view/renderer/template_renderer.rb +36 -26
  89. data/lib/action_view/rendering.rb +57 -38
  90. data/lib/action_view/routing_url_for.rb +15 -12
  91. data/lib/action_view/tasks/cache_digests.rake +2 -0
  92. data/lib/action_view/template.rb +69 -76
  93. data/lib/action_view/template/error.rb +32 -18
  94. data/lib/action_view/template/handlers.rb +4 -2
  95. data/lib/action_view/template/handlers/builder.rb +5 -6
  96. data/lib/action_view/template/handlers/erb.rb +20 -19
  97. data/lib/action_view/template/handlers/erb/erubi.rb +17 -9
  98. data/lib/action_view/template/handlers/html.rb +3 -1
  99. data/lib/action_view/template/handlers/raw.rb +4 -2
  100. data/lib/action_view/template/html.rb +8 -7
  101. data/lib/action_view/template/inline.rb +22 -0
  102. data/lib/action_view/template/raw_file.rb +25 -0
  103. data/lib/action_view/template/renderable.rb +24 -0
  104. data/lib/action_view/template/resolver.rb +194 -152
  105. data/lib/action_view/template/sources.rb +13 -0
  106. data/lib/action_view/template/sources/file.rb +17 -0
  107. data/lib/action_view/template/text.rb +5 -4
  108. data/lib/action_view/template/types.rb +3 -1
  109. data/lib/action_view/test_case.rb +38 -30
  110. data/lib/action_view/testing/resolvers.rb +20 -27
  111. data/lib/action_view/unbound_template.rb +31 -0
  112. data/lib/action_view/version.rb +2 -0
  113. data/lib/action_view/view_paths.rb +61 -40
  114. data/lib/assets/compiled/rails-ujs.js +84 -23
  115. metadata +34 -23
  116. data/lib/action_view/helpers/record_tag_helper.rb +0 -21
  117. data/lib/action_view/template/handlers/erb/deprecated_erubis.rb +0 -9
  118. data/lib/action_view/template/handlers/erb/erubis.rb +0 -81
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 383c1479ecf3032a9bf3c400ab57ad0cf9ad66b3
4
- data.tar.gz: 3f804cfd08782238f8db66a3c8c3f93b3133d8b8
2
+ SHA256:
3
+ metadata.gz: a164a5f7ce09e84dfab86b45a2df631dc782f50fc22c0cbb92f967c95808de63
4
+ data.tar.gz: 9dd5e8614c436054ebb785df67171b16deb22bb8be3518d57ee8486613919d86
5
5
  SHA512:
6
- metadata.gz: 650539b8232d807eb9e8e55dec41eec06790de60e6cae435fa486b976220ca460945cf5bba02cbb2c3d5595f8c3db1ddc1a71ccc9e4d6584d2d46a1b6bea91f2
7
- data.tar.gz: f4c1c201a5e6ac6323ef315718385d470f34a3709bea6c5944698cd4e0f6b926bd320bbd8bb1cf576b0f3ac8e8b0fc3e7f9aded2dc114f61e8ccbf3953c7de94
6
+ metadata.gz: 3502d7dd7b2407ce4634afadcd61b2d654f248d91bf85d9f43bd6b1ad150fdd84a45b6f009a04d899be293d123be503a7e497b761c10a576bea6c9248140f599
7
+ data.tar.gz: 3b0695d10e6939424bf14a8cbcea85f6628de02d0a4de37266213883604be8a95daf65eb435cf32260dae4d8b8ad562af7c37a3b426a2589fd305056ec381361
data/CHANGELOG.md CHANGED
@@ -1,273 +1,304 @@
1
- ## Rails 5.1.4 (September 07, 2017) ##
1
+ ## Rails 6.1.1 (January 07, 2021) ##
2
2
 
3
- * No changes.
3
+ * Fix lazy translation in partial with block.
4
4
 
5
+ *Marek Kasztelnik*
5
6
 
6
- ## Rails 5.1.4.rc1 (August 24, 2017) ##
7
+ * Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
7
8
 
8
- * No changes.
9
+ *aar0nr*
9
10
 
11
+ * Link preloading keep integrity hashes in the header.
10
12
 
11
- ## Rails 5.1.3 (August 03, 2017) ##
13
+ *Étienne Barrié*
12
14
 
13
- * No changes.
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
- ## Rails 5.1.3.rc3 (July 31, 2017) ##
21
+ * The `translate` helper now resolves `default` values when a `nil` key is
22
+ specified, instead of always returning `nil`.
17
23
 
18
- * No changes.
24
+ *Jonathan Hefner*
19
25
 
20
26
 
21
- ## Rails 5.1.3.rc2 (July 25, 2017) ##
27
+ ## Rails 6.1.0 (December 09, 2020) ##
22
28
 
23
- * No changes.
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
- ## Rails 5.1.3.rc1 (July 19, 2017) ##
34
+ *Taufiq Muhammadi*
27
35
 
28
- * No changes.
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
- ## Rails 5.1.2 (June 26, 2017) ##
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
- * Fix issues with scopes and engine on `current_page?` method.
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
- This makes sure that the labels are linked up with the fields.
47
+ * Yield translated strings to calls of `ActionView::FormBuilder#button`
48
+ when a block is given.
42
49
 
43
- Fixes #29014.
50
+ *Sean Doyle*
44
51
 
45
- *Yuji Yaginuma*
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
- * Update distance_of_time_in_words helper to display better error messages
48
- for bad input.
55
+ *Sean Doyle*
49
56
 
50
- *Jay Hayes*
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
- ## Rails 5.1.1 (May 12, 2017) ##
63
+ *Sean Doyle*
54
64
 
55
- * No changes.
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
- ## Rails 5.1.0 (April 27, 2017) ##
80
+ *Sean Doyle*
59
81
 
60
- * Remove the option `encode_special_chars` misnomer from `strip_tags`
82
+ * Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
61
83
 
62
- As of rails-html-sanitizer v1.0.3, the sanitizer will ignore the
63
- `encode_special_chars` option.
84
+ *Rafael Mendonça França*
64
85
 
65
- Fixes #28060.
86
+ * Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
66
87
 
67
- *Andrew Hood*
88
+ *Rafael Mendonça França*
68
89
 
69
- * Change the ERB handler from Erubis to Erubi.
90
+ * Remove deprecated `formats` from `ActionView::Template::HTML`.
70
91
 
71
- Erubi is an Erubis fork that's svelte, simple, and currently maintained.
72
- Plus it supports `--enable-frozen-string-literal` in Ruby 2.3+.
92
+ *Rafael Mendonça França*
73
93
 
74
- Compatibility: Drops support for `<%===` tags for debug output.
75
- These were an unused, undocumented side effect of the Erubis
76
- implementation.
94
+ * Remove deprecated `formats` from `ActionView::Template::RawFile`.
77
95
 
78
- Deprecation: The Erubis handler will be removed in Rails 5.2, for the
79
- handful of folks using it directly.
96
+ *Rafael Mendonça França*
80
97
 
81
- *Jeremy Evans*
98
+ * Remove deprecated `formats` from `ActionView::Template::Text`.
82
99
 
83
- * Allow render locals to be assigned to instance variables in a view.
100
+ *Rafael Mendonça França*
84
101
 
85
- Fixes #27480.
102
+ * Remove deprecated `find_file` from `ActionView::PathSet`.
86
103
 
87
- *Andrew White*
104
+ *Rafael Mendonça França*
88
105
 
89
- * Add `check_parameters` option to `current_page?` which makes it more strict.
106
+ * Remove deprecated `rendered_format` from `ActionView::LookupContext`.
90
107
 
91
- *Maksym Pugach*
108
+ *Rafael Mendonça França*
92
109
 
93
- * Return correct object name in form helper method after `fields_for`.
110
+ * Remove deprecated `find_file` from `ActionView::ViewPaths`.
94
111
 
95
- Fixes #26931.
112
+ *Rafael Mendonça França*
96
113
 
97
- *Yuji Yaginuma*
114
+ * Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
98
115
 
99
- * Use `ActionView::Resolver.caching?` (`config.action_view.cache_template_loading`)
100
- to enable template recompilation.
116
+ *Rafael Mendonça França*
101
117
 
102
- Before it was enabled by `consider_all_requests_local`, which caused
103
- recompilation in tests.
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
- *Max Melentiev*
121
+ *Rafael Mendonça França*
106
122
 
107
- * Add `form_with` to unify `form_tag` and `form_for` usage.
123
+ * Remove deprecated `format` argument `ActionView::Base#initialize`.
108
124
 
109
- Used like `form_tag` (where just the open tag is output):
125
+ *Rafael Mendonça França*
110
126
 
111
- ```erb
112
- <%= form_with scope: :post, url: super_special_posts_path %>
113
- ```
127
+ * Remove deprecated `ActionView::Template#refresh`.
114
128
 
115
- Used like `form_for`:
129
+ *Rafael Mendonça França*
116
130
 
117
- ```erb
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
- *Kasper Timm Hansen*, *Marek Kirejczyk*
133
+ *Rafael Mendonça França*
124
134
 
125
- * Add `fields` form helper method.
135
+ * Remove deprecated `ActionView::Template#variants`.
126
136
 
127
- ```erb
128
- <%= fields :comment, model: @comment do |fields| %>
129
- <%= fields.text_field :title %>
130
- <% end %>
131
- ```
137
+ *Rafael Mendonça França*
132
138
 
133
- Can also be used within form helpers such as `form_with`.
139
+ * Remove deprecated `ActionView::Template#formats`.
134
140
 
135
- *Kasper Timm Hansen*
141
+ *Rafael Mendonça França*
136
142
 
137
- * Removed deprecated `#original_exception` in `ActionView::Template::Error`.
143
+ * Remove deprecated `ActionView::Template#virtual_path=`.
138
144
 
139
145
  *Rafael Mendonça França*
140
146
 
141
- * Render now accepts any keys for locals, including reserved keywords.
147
+ * Remove deprecated `ActionView::Template#updated_at`.
142
148
 
143
- Only locals with valid variable names get set directly. Others
144
- will still be available in `local_assigns`.
149
+ *Rafael Mendonça França*
145
150
 
146
- Example of render with reserved keywords:
151
+ * Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
147
152
 
148
- ```erb
149
- <%= render "example", class: "text-center", message: "Hello world!" %>
153
+ *Rafael Mendonça França*
150
154
 
151
- <!-- _example.html.erb: -->
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
- *Peter Schilling*, *Matthew Draper*
157
+ *Rafael Mendonça França*
158
158
 
159
- * Add `:skip_pipeline` option to several asset tag helpers
159
+ * Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
160
160
 
161
- `javascript_include_tag`, `stylesheet_link_tag`, `favicon_link_tag`,
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
- *Richard Schneeman*
163
+ * Remove deprecated `config.action_view.finalize_compiled_template_methods`
167
164
 
168
- * Add `:poster_skip_pipeline` option to the `video_tag` helper
165
+ *Rafael Mendonça França*
169
166
 
170
- `video_tag` now accepts a `:poster_skip_pipeline` option which can be used
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
- *Richard Schneeman*
169
+ *Rafael Mendonça França*
175
170
 
176
- * Show cache hits and misses when rendering partials.
171
+ * Remove deprecated support to passing absolute paths to `render template:`.
177
172
 
178
- Partials using the `cache` helper will show whether a render hit or missed
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
- This removes the need for the old fragment cache logging:
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
- Though that full output can be reenabled with
196
- `config.action_controller.enable_fragment_cache_logging = true`.
181
+ *Rafael Mendonça França*
197
182
 
198
- *Stan Lo*
183
+ * Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
199
184
 
200
- * Changed partial rendering with a collection to allow collections which
201
- implement `to_a`.
185
+ *Rafael Mendonça França*
202
186
 
203
- Extracting the collection option had an optimization to avoid unnecessary
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
- *Steven Harman*
189
+ *Rafael Mendonça França*
210
190
 
211
- * New syntax for tag helpers. Avoid positional parameters and support HTML5 by default.
212
- Example usage of tag helpers before:
191
+ * `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
192
+ the translated text and the fully resolved translation key:
213
193
 
214
- ```ruby
215
- tag(:br, nil, true)
216
- content_tag(:div, content_tag(:p, "Hello world!"), class: "strong")
194
+ <%= translate(".relative_key") do |translation, resolved_key| %>
195
+ <span title="<%= resolved_key %>"><%= translation %></span>
196
+ <% end %>
217
197
 
218
- <%= content_tag :div, class: "strong" do -%>
219
- Hello world!
220
- <% end -%>
221
- ```
198
+ *Sean Doyle*
222
199
 
223
- Example usage of tag helpers after:
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
- ```ruby
226
- tag.br
227
- tag.div tag.p("Hello world!"), class: "strong"
205
+ Fixes #38984.
228
206
 
229
- <%= tag.div class: "strong" do %>
230
- Hello world!
231
- <% end %>
232
- ```
207
+ *Aaron Lipman*
233
208
 
234
- *Marek Kirejczyk*, *Kasper Timm Hansen*
209
+ * Deprecate `config.action_view.raise_on_missing_translations` in favor of
210
+ `config.i18n.raise_on_missing_translations`.
235
211
 
236
- * Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` fields.
212
+ New generalized configuration option now determines whether an error should be raised
213
+ for missing translations in controllers and views.
237
214
 
238
- As a new specification of the HTML 5 the text field type `datetime` will no longer exist
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
- *Herminio Torres*
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
- * Raw template handler (which is also the default template handler in Rails 5) now outputs
245
- HTML-safe strings.
220
+ *Zach Kemp*
246
221
 
247
- In Rails 5 the default template handler was changed to the raw template handler. Because
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
- *Eileen M. Uchitelle*
224
+ *Joel Hawksley*, *Aaron Patterson*
254
225
 
255
- * `select_tag`'s `include_blank` option for generation for blank option tag, now adds an empty space label,
256
- when the value as well as content for option tag are empty, so that we conform with html specification.
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
- Generation of option before:
229
+ *Stefan Wrobel*
260
230
 
261
- ```html
262
- <option value=""></option>
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
- Generation of option after:
240
+ * Add support for conditional values to TagBuilder.
266
241
 
267
- ```html
268
- <option value="" label=" "></option>
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
- *Vipul A M*
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 [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/actionview/CHANGELOG.md) for previous changes.
304
+ Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.