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.

Files changed (124) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +181 -359
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +12 -6
  5. data/lib/action_view/base.rb +115 -43
  6. data/lib/action_view/buffers.rb +22 -4
  7. data/lib/action_view/cache_expiry.rb +52 -0
  8. data/lib/action_view/context.rb +8 -12
  9. data/lib/action_view/dependency_tracker.rb +61 -21
  10. data/lib/action_view/digestor.rb +89 -84
  11. data/lib/action_view/flows.rb +12 -13
  12. data/lib/action_view/gem_version.rb +6 -4
  13. data/lib/action_view/helpers/active_model_helper.rb +16 -11
  14. data/lib/action_view/helpers/asset_tag_helper.rb +311 -105
  15. data/lib/action_view/helpers/asset_url_helper.rb +197 -80
  16. data/lib/action_view/helpers/atom_feed_helper.rb +20 -17
  17. data/lib/action_view/helpers/cache_helper.rb +109 -45
  18. data/lib/action_view/helpers/capture_helper.rb +20 -22
  19. data/lib/action_view/helpers/controller_helper.rb +15 -4
  20. data/lib/action_view/helpers/csp_helper.rb +26 -0
  21. data/lib/action_view/helpers/csrf_helper.rb +8 -6
  22. data/lib/action_view/helpers/date_helper.rb +245 -140
  23. data/lib/action_view/helpers/debug_helper.rb +14 -17
  24. data/lib/action_view/helpers/form_helper.rb +875 -148
  25. data/lib/action_view/helpers/form_options_helper.rb +128 -82
  26. data/lib/action_view/helpers/form_tag_helper.rb +253 -91
  27. data/lib/action_view/helpers/javascript_helper.rb +37 -15
  28. data/lib/action_view/helpers/number_helper.rb +100 -77
  29. data/lib/action_view/helpers/output_safety_helper.rb +42 -10
  30. data/lib/action_view/helpers/rendering_helper.rb +26 -15
  31. data/lib/action_view/helpers/sanitize_helper.rb +79 -164
  32. data/lib/action_view/helpers/tag_helper.rb +277 -64
  33. data/lib/action_view/helpers/tags/base.rb +143 -92
  34. data/lib/action_view/helpers/tags/check_box.rb +20 -19
  35. data/lib/action_view/helpers/tags/checkable.rb +4 -2
  36. data/lib/action_view/helpers/tags/collection_check_boxes.rb +12 -30
  37. data/lib/action_view/helpers/tags/collection_helpers.rb +69 -36
  38. data/lib/action_view/helpers/tags/collection_radio_buttons.rb +6 -12
  39. data/lib/action_view/helpers/tags/collection_select.rb +4 -2
  40. data/lib/action_view/helpers/tags/color_field.rb +4 -3
  41. data/lib/action_view/helpers/tags/date_field.rb +3 -2
  42. data/lib/action_view/helpers/tags/date_select.rb +38 -37
  43. data/lib/action_view/helpers/tags/datetime_field.rb +14 -5
  44. data/lib/action_view/helpers/tags/datetime_local_field.rb +3 -2
  45. data/lib/action_view/helpers/tags/datetime_select.rb +2 -0
  46. data/lib/action_view/helpers/tags/email_field.rb +2 -0
  47. data/lib/action_view/helpers/tags/file_field.rb +2 -0
  48. data/lib/action_view/helpers/tags/grouped_collection_select.rb +4 -2
  49. data/lib/action_view/helpers/tags/hidden_field.rb +2 -0
  50. data/lib/action_view/helpers/tags/label.rb +41 -22
  51. data/lib/action_view/helpers/tags/month_field.rb +3 -2
  52. data/lib/action_view/helpers/tags/number_field.rb +2 -0
  53. data/lib/action_view/helpers/tags/password_field.rb +3 -1
  54. data/lib/action_view/helpers/tags/placeholderable.rb +24 -0
  55. data/lib/action_view/helpers/tags/radio_button.rb +7 -6
  56. data/lib/action_view/helpers/tags/range_field.rb +2 -0
  57. data/lib/action_view/helpers/tags/search_field.rb +3 -0
  58. data/lib/action_view/helpers/tags/select.rb +11 -10
  59. data/lib/action_view/helpers/tags/tel_field.rb +2 -0
  60. data/lib/action_view/helpers/tags/text_area.rb +7 -1
  61. data/lib/action_view/helpers/tags/text_field.rb +11 -7
  62. data/lib/action_view/helpers/tags/time_field.rb +3 -2
  63. data/lib/action_view/helpers/tags/time_select.rb +2 -0
  64. data/lib/action_view/helpers/tags/time_zone_select.rb +3 -1
  65. data/lib/action_view/helpers/tags/translator.rb +39 -0
  66. data/lib/action_view/helpers/tags/url_field.rb +2 -0
  67. data/lib/action_view/helpers/tags/week_field.rb +3 -2
  68. data/lib/action_view/helpers/tags.rb +4 -1
  69. data/lib/action_view/helpers/text_helper.rb +80 -45
  70. data/lib/action_view/helpers/translation_helper.rb +148 -67
  71. data/lib/action_view/helpers/url_helper.rb +289 -147
  72. data/lib/action_view/helpers.rb +5 -3
  73. data/lib/action_view/layouts.rb +68 -63
  74. data/lib/action_view/log_subscriber.rb +80 -13
  75. data/lib/action_view/lookup_context.rb +137 -92
  76. data/lib/action_view/model_naming.rb +4 -2
  77. data/lib/action_view/path_set.rb +30 -16
  78. data/lib/action_view/railtie.rb +62 -13
  79. data/lib/action_view/record_identifier.rb +53 -26
  80. data/lib/action_view/renderer/abstract_renderer.rb +152 -13
  81. data/lib/action_view/renderer/collection_renderer.rb +196 -0
  82. data/lib/action_view/renderer/object_renderer.rb +34 -0
  83. data/lib/action_view/renderer/partial_renderer/collection_caching.rb +102 -0
  84. data/lib/action_view/renderer/partial_renderer.rb +61 -261
  85. data/lib/action_view/renderer/renderer.rb +67 -6
  86. data/lib/action_view/renderer/streaming_template_renderer.rb +58 -54
  87. data/lib/action_view/renderer/template_renderer.rb +83 -75
  88. data/lib/action_view/rendering.rb +73 -46
  89. data/lib/action_view/routing_url_for.rb +54 -17
  90. data/lib/action_view/tasks/cache_digests.rake +25 -0
  91. data/lib/action_view/template/error.rb +44 -29
  92. data/lib/action_view/template/handlers/builder.rb +12 -13
  93. data/lib/action_view/template/handlers/erb/erubi.rb +89 -0
  94. data/lib/action_view/template/handlers/erb.rb +23 -89
  95. data/lib/action_view/template/handlers/html.rb +11 -0
  96. data/lib/action_view/template/handlers/raw.rb +4 -4
  97. data/lib/action_view/template/handlers.rb +22 -9
  98. data/lib/action_view/template/html.rb +10 -11
  99. data/lib/action_view/template/inline.rb +22 -0
  100. data/lib/action_view/template/raw_file.rb +25 -0
  101. data/lib/action_view/template/renderable.rb +24 -0
  102. data/lib/action_view/template/resolver.rb +267 -181
  103. data/lib/action_view/template/sources/file.rb +17 -0
  104. data/lib/action_view/template/sources.rb +13 -0
  105. data/lib/action_view/template/text.rb +8 -10
  106. data/lib/action_view/template/types.rb +18 -18
  107. data/lib/action_view/template.rb +109 -99
  108. data/lib/action_view/test_case.rb +73 -53
  109. data/lib/action_view/testing/resolvers.rb +24 -33
  110. data/lib/action_view/unbound_template.rb +31 -0
  111. data/lib/action_view/version.rb +3 -1
  112. data/lib/action_view/view_paths.rb +74 -44
  113. data/lib/action_view.rb +14 -9
  114. data/lib/assets/compiled/rails-ujs.js +746 -0
  115. metadata +71 -26
  116. data/lib/action_view/helpers/record_tag_helper.rb +0 -108
  117. data/lib/action_view/tasks/dependencies.rake +0 -23
  118. data/lib/action_view/vendor/html-scanner/html/document.rb +0 -68
  119. data/lib/action_view/vendor/html-scanner/html/node.rb +0 -532
  120. data/lib/action_view/vendor/html-scanner/html/sanitizer.rb +0 -188
  121. data/lib/action_view/vendor/html-scanner/html/selector.rb +0 -830
  122. data/lib/action_view/vendor/html-scanner/html/tokenizer.rb +0 -107
  123. data/lib/action_view/vendor/html-scanner/html/version.rb +0 -11
  124. data/lib/action_view/vendor/html-scanner.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 63c56dd75d854377e032648384edf3e79ef224fd
4
- data.tar.gz: 15256ef02b43f65970b2773af3561efd461aaaf4
2
+ SHA256:
3
+ metadata.gz: b4c5b5daaf81e8ceaf98fbdc431da0d862fc1e4cfe54a267dec7535e128eeeee
4
+ data.tar.gz: 8de83e0aff66bf999c15c2164dca7398a16b89784148b0756070659184719a1a
5
5
  SHA512:
6
- metadata.gz: 84384f933cc0da43c90a99d2e6eee167f7c2cc4eb7bc0fad71450eb83efc313fee9e2c6b3c59cc5978d2a50843ec10e91280af400ed2c106517b6316b546db11
7
- data.tar.gz: 210895b3193f99ad4cbbcb1c5fd7cd83f48d868547f25a78b96dd7bac6f9785aa5abb0821f01e979faf99e4e57a757b0b051197aa71413dd2834dbbe2450f76f
6
+ metadata.gz: ecb0ce5f0514023f0b0598eb175fcd9958377426d7a4ff66f7ce308159e3b7ed542d66d0a96dcb77d8d19f5382b995d207b439015fda828510932efa0763dc9f
7
+ data.tar.gz: bd1824cc61e90ac8ec3ae54d3ecb67bc43a2865bb34e76efbb2f0ae43d8a6143b08bc75292f3fb231fa9f94cb661e9410d8a1384ba98601183ca5e341013ac53
data/CHANGELOG.md CHANGED
@@ -1,502 +1,324 @@
1
- ## Rails 4.1.13 (August 24, 2015) ##
1
+ ## Rails 6.1.3.1 (March 26, 2021) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 4.1.12 (June 25, 2015) ##
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 4.1.4 (July 2, 2014) ##
11
+ ## Rails 6.1.2.1 (February 10, 2021) ##
103
12
 
104
13
  * No changes.
105
14
 
106
15
 
107
- ## Rails 4.1.3 (July 2, 2014) ##
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 4.1.0 (April 8, 2014) ##
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
- *Yves Senn*
23
+ * Fix lazy translation in partial with block.
154
24
 
155
- * Take variants into account when calculating template digests in ActionView::Digestor.
25
+ *Marek Kasztelnik*
156
26
 
157
- The arguments to ActionView::Digestor#digest are now being passed as a hash
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
- *Piotr Chmolowski, Łukasz Strzałkowski*
29
+ *aar0nr*
162
30
 
163
- * Fix a problem where the default options for the `button_tag` helper were not
164
- being applied correctly.
31
+ * Link preloading keep integrity hashes in the header.
165
32
 
166
- Fixes #14255.
33
+ *Étienne Barrié*
167
34
 
168
- *Sergey Prikhodko*
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
- * Fix ActionView label translation for more than 10 nested elements.
39
+ *Andrew White*
171
40
 
172
- *Vladimir Krylov*
41
+ * The `translate` helper now resolves `default` values when a `nil` key is
42
+ specified, instead of always returning `nil`.
173
43
 
174
- * Added `:plain`, `:html` and `:body` options for `render` method. Please see
175
- the ActionPack release notes for more detail.
44
+ *Jonathan Hefner*
176
45
 
177
- *Prem Sichanugrist*
178
46
 
179
- * Date select helpers accept a format string for the months selector via the
180
- new option `:month_format_string`.
47
+ ## Rails 6.1.0 (December 09, 2020) ##
181
48
 
182
- When rendered, the format string gets passed keys `:number` (integer), and
183
- `:name` (string), in order to be able to interpolate them as in
49
+ * SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
50
+ call safe_list_sanitizer's class method
184
51
 
185
- '%{name} (%<number>02d)'
52
+ Fixes #39586
186
53
 
187
- for example.
54
+ *Taufiq Muhammadi*
188
55
 
189
- This option is motivated by #13618.
56
+ * Change form_with to generate non-remote forms by default.
190
57
 
191
- *Xavier Noria*
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
- * Added `config.action_view.raise_on_missing_translations` to define whether an
194
- error should be raised for missing translations.
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
- Fixes #13196.
65
+ *Petrik de Heus*
197
66
 
198
- *Kassio Borges*
67
+ * Yield translated strings to calls of `ActionView::FormBuilder#button`
68
+ when a block is given.
199
69
 
200
- * Improved ERB dependency detection. New argument types and formattings for the `render`
201
- calls can be matched.
70
+ *Sean Doyle*
202
71
 
203
- Fixes #13074, #13116.
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
- *João Britto*
75
+ *Sean Doyle*
206
76
 
207
- * Use `display:none` instead of `display:inline` for hidden fields.
77
+ * Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
78
+ and make the original available as an alias.
208
79
 
209
- Fixes #6403.
80
+ token_list("foo", "foo bar")
81
+ # => "foo bar"
210
82
 
211
- *Gaelian Ditchburn*
83
+ *Sean Doyle*
212
84
 
213
- * The `video_tag` helper now accepts a number for `:size`.
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
- The `:size` option of the `video_tag` helper now can be specified
216
- with a stringified number. The `width` and `height` attributes of
217
- the generated tag will be the same.
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
- *Kuldeep Aggarwal*
100
+ *Sean Doyle*
220
101
 
221
- * Escape format, negative_format and units options of number helpers
102
+ * Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
222
103
 
223
- Fixes: CVE-2014-0081
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
- * Fix a long-standing bug in `json_escape` that caused quotation marks to be stripped.
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
- *Godfrey Chan*
108
+ *Rafael Mendonça França*
274
109
 
275
- * `ActionView::MissingTemplate` includes underscore when raised for a partial.
110
+ * Remove deprecated `formats` from `ActionView::Template::HTML`.
276
111
 
277
- Fixes #13002.
112
+ *Rafael Mendonça França*
278
113
 
279
- *Yves Senn*
114
+ * Remove deprecated `formats` from `ActionView::Template::RawFile`.
280
115
 
281
- * Use `set_backtrace` instead of instance variable `@backtrace` in ActionView exceptions.
116
+ *Rafael Mendonça França*
282
117
 
283
- *Shimpei Makimoto*
118
+ * Remove deprecated `formats` from `ActionView::Template::Text`.
284
119
 
285
- * Fix `simple_format` escapes own output when passing `sanitize: true`.
120
+ *Rafael Mendonça França*
286
121
 
287
- *Paul Seidemann*
122
+ * Remove deprecated `find_file` from `ActionView::PathSet`.
288
123
 
289
- * Ensure `ActionView::Digestor.cache` is correctly cleaned up when
290
- combining recursive templates with `ActionView::Resolver.caching = false`.
124
+ *Rafael Mendonça França*
291
125
 
292
- *wyaeld*
126
+ * Remove deprecated `rendered_format` from `ActionView::LookupContext`.
293
127
 
294
- * Fix `collection_check_boxes` so the generated hidden input correctly uses the
295
- name attribute provided in the options hash.
128
+ *Rafael Mendonça França*
296
129
 
297
- *Angel N. Sciortino*
130
+ * Remove deprecated `find_file` from `ActionView::ViewPaths`.
298
131
 
299
- * Fix some edge cases for the AV `select` helper with the `:selected` option.
132
+ *Rafael Mendonça França*
300
133
 
301
- *Bogdan Gusiev*
134
+ * Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
302
135
 
303
- * Enable passing a block to the `select` helper.
136
+ *Rafael Mendonça França*
304
137
 
305
- Example:
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
- <%= select(report, "campaign_ids") do %>
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
- *Bogdan Gusiev*
143
+ * Remove deprecated `format` argument `ActionView::Base#initialize`.
314
144
 
315
- * Handle `:namespace` form option in collection labels.
145
+ *Rafael Mendonça França*
316
146
 
317
- *Vasiliy Ermolovich*
147
+ * Remove deprecated `ActionView::Template#refresh`.
318
148
 
319
- * Fix `form_for` when both `namespace` and `as` options are present.
149
+ *Rafael Mendonça França*
320
150
 
321
- The `as` option no longer overwrites the `namespace` option when
322
- generating an HTML id attribute of the form element.
151
+ * Remove deprecated `ActionView::Template#original_encoding`.
323
152
 
324
- *Adam Niedzielski*
153
+ *Rafael Mendonça França*
325
154
 
326
- * Fix `excerpt` when `:separator` is `nil`.
155
+ * Remove deprecated `ActionView::Template#variants`.
327
156
 
328
- *Paul Nikitochkin*
157
+ *Rafael Mendonça França*
329
158
 
330
- * Only cache template digests if `config.cache_template_loading` is true.
159
+ * Remove deprecated `ActionView::Template#formats`.
331
160
 
332
- *Josh Lauer*, *Justin Ridgewell*
161
+ *Rafael Mendonça França*
333
162
 
334
- * Fix a bug where the lookup details were not being taken into account
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
- *Daniel Schierbeck*
165
+ *Rafael Mendonça França*
339
166
 
340
- * Added an `extname` hash option to the `javascript_include_tag` method.
167
+ * Remove deprecated `ActionView::Template#updated_at`.
341
168
 
342
- Before:
169
+ *Rafael Mendonça França*
343
170
 
344
- javascript_include_tag('templates.jst')
345
- # => <script src="/javascripts/templates.jst.js"></script>
171
+ * Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
346
172
 
347
- After:
173
+ *Rafael Mendonça França*
348
174
 
349
- javascript_include_tag('templates.jst', extname: false )
350
- # => <script src="/javascripts/templates.jst"></script>
175
+ * Make `locals` argument required on `ActionView::Template#initialize`.
351
176
 
352
- *Nathan Stitt*
177
+ *Rafael Mendonça França*
353
178
 
354
- * Fix `current_page?` when the URL contains escaped characters and the
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
- * Fix `text_area` to behave like `text_field` when `nil` is given as a
360
- value.
183
+ * Remove deprecated `config.action_view.finalize_compiled_template_methods`
361
184
 
362
- Before:
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
- After:
187
+ * Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
368
188
 
369
- f.text_area :field, value: nil #=> <textarea></textarea>
189
+ *Rafael Mendonça França*
370
190
 
371
- *Joel Cogen*
191
+ * Remove deprecated support to passing absolute paths to `render template:`.
372
192
 
373
- * Allow `grouped_options_for_select` to optionally contain html attributes
374
- as the last element of the array.
193
+ *Rafael Mendonça França*
375
194
 
376
- grouped_options_for_select(
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
- *Vasiliy Ermolovich*
197
+ *Rafael Mendonça França*
381
198
 
382
- * Fix default rendered format problem when calling `render` without :content_type option.
383
- It should return :html. Fix #11393.
199
+ * Remove support to template handlers that don't accept two arguments.
384
200
 
385
- *Gleb Mazovetskiy*, *Oleg*, *kennyj*
201
+ *Rafael Mendonça França*
386
202
 
387
- * Fix `link_to` with block and url hashes.
203
+ * Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
388
204
 
389
- Before:
205
+ *Rafael Mendonça França*
390
206
 
391
- link_to(action: 'bar', controller: 'foo') { content_tag(:span, 'Example site') }
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
- After:
209
+ *Rafael Mendonça França*
395
210
 
396
- link_to(action: 'bar', controller: 'foo') { content_tag(:span, 'Example site') }
397
- # => "<a href=\"/foo/bar\"><span>Example site</span></a>"
211
+ * `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
212
+ the translated text and the fully resolved translation key:
398
213
 
399
- *Murahashi Sanemat Kenichi*
214
+ <%= translate(".relative_key") do |translation, resolved_key| %>
215
+ <span title="<%= resolved_key %>"><%= translation %></span>
216
+ <% end %>
400
217
 
401
- * Fix "Stack Level Too Deep" error when rendering recursive partials.
218
+ *Sean Doyle*
402
219
 
403
- Fixes #11340.
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
- *Rafael Mendonça França*
225
+ Fixes #38984.
406
226
 
407
- * Added an `enforce_utf8` hash option for `form_tag` method.
227
+ *Aaron Lipman*
408
228
 
409
- Control to output a hidden input tag with name `utf8` without monkey
410
- patching.
229
+ * Deprecate `config.action_view.raise_on_missing_translations` in favor of
230
+ `config.i18n.raise_on_missing_translations`.
411
231
 
412
- Before:
232
+ New generalized configuration option now determines whether an error should be raised
233
+ for missing translations in controllers and views.
413
234
 
414
- form_tag
415
- # => '<form>..<input name="utf8" type="hidden" value="&#x2713;" />..</form>'
235
+ *fatkodima*
416
236
 
417
- After:
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
- form_tag
420
- # => '<form>..<input name="utf8" type="hidden" value="&#x2713;" />..</form>'
240
+ *Zach Kemp*
421
241
 
422
- form_tag({}, { :enforce_utf8 => false })
423
- # => '<form>....</form>'
242
+ * `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
424
243
 
425
- *ma2gedev*
244
+ *Joel Hawksley*, *Aaron Patterson*
426
245
 
427
- * Remove the deprecated `include_seconds` argument from `distance_of_time_in_words`,
428
- pass in an `:include_seconds` hash option to use this feature.
246
+ * `ActionView::Helpers::TranslationHelper#translate` returns nil when
247
+ passed `default: nil` without a translation matching `I18n#translate`.
429
248
 
430
- *Carlos Antonio da Silva*
249
+ *Stefan Wrobel*
431
250
 
432
- * Remove deprecated block passing to `FormBuilder#new`.
251
+ * `OptimizedFileSystemResolver` prefers template details in order of locale,
252
+ formats, variants, handlers.
433
253
 
434
- *Vipul A M*
254
+ *Iago Pimenta*
435
255
 
436
- * Pick `DateField` `DateTimeField` and `ColorField` values from stringified options
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
- *Jon Rowe*
258
+ *Joel Hawksley*, *Aaron Patterson*
440
259
 
441
- * Remove the deprecated `prompt` argument from `grouped_options_for_select`,
442
- pass in a `:prompt` hash option to use this feature.
260
+ * Add support for conditional values to TagBuilder.
443
261
 
444
- *kennyj*
262
+ *Joel Hawksley*
445
263
 
446
- * Always escape the result of `link_to_unless` methods.
264
+ * `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
447
265
 
448
- Before:
266
+ ```ruby
267
+ @post = Post.new
268
+ @post.category = nil
449
269
 
450
- link_to_unless(true, '<b>Showing</b>', 'github.com')
451
- # => "<b>Showing</b>"
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
- link_to_unless(true, '<b>Showing</b>', 'github.com')
456
- # => "&lt;b&gt;Showing&lt;/b&gt;"
289
+ *bogdanvlviv*
457
290
 
458
- *dtaniwaki*
291
+ * Log lines for partial renders and started template renders are now
292
+ emitted at the `DEBUG` level instead of `INFO`.
459
293
 
460
- * Use a case insensitive URI Regexp for #asset_path.
294
+ Completed template renders are still logged at the `INFO` level.
461
295
 
462
- This fixes a problem where the same asset path using different cases
463
- was generating different URIs.
296
+ *DHH*
464
297
 
465
- Before:
298
+ * ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
466
299
 
467
- image_tag("HTTP://google.com")
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
- After:
302
+ * Added `phone_to` helper method to create a link from mobile numbers.
473
303
 
474
- image_tag("HTTP://google.com")
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
- *David Celis*
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
- * Allow `collection_check_boxes` and `collection_radio_buttons` to
482
- optionally contain html attributes as the last element of the array.
309
+ *Guilherme Mansur*, *Kasper Timm Hansen*
483
310
 
484
- *Vasiliy Ermolovich*
311
+ * Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
485
312
 
486
- * Update the HTML `BOOLEAN_ATTRIBUTES` in `ActionView::Helpers::TagHelper`
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
- *Alex Peattie*
315
+ * `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
492
316
 
493
- * Fix an issue where partials with a number in the filename were not
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
- *Bryan Ricker*
319
+ * Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
497
320
 
498
- * First release, ActionView extracted from ActionPack.
321
+ *Younes SERRAJ*
499
322
 
500
- *Piotr Sarnacki*, *Łukasz Strzałkowski*
501
323
 
502
- Please check [4-0-stable (ActionPack's CHANGELOG)](https://github.com/rails/rails/blob/4-0-stable/actionpack/CHANGELOG.md) for previous changes.
324
+ Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.