actionview 5.2.7.1 → 6.1.4.6

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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +250 -112
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +5 -3
  5. data/lib/action_view/base.rb +81 -15
  6. data/lib/action_view/buffers.rb +15 -0
  7. data/lib/action_view/cache_expiry.rb +52 -0
  8. data/lib/action_view/context.rb +5 -9
  9. data/lib/action_view/dependency_tracker.rb +10 -4
  10. data/lib/action_view/digestor.rb +15 -22
  11. data/lib/action_view/flows.rb +0 -1
  12. data/lib/action_view/gem_version.rb +4 -4
  13. data/lib/action_view/helpers/active_model_helper.rb +0 -1
  14. data/lib/action_view/helpers/asset_tag_helper.rb +64 -47
  15. data/lib/action_view/helpers/asset_url_helper.rb +9 -6
  16. data/lib/action_view/helpers/atom_feed_helper.rb +2 -1
  17. data/lib/action_view/helpers/cache_helper.rb +23 -22
  18. data/lib/action_view/helpers/capture_helper.rb +4 -0
  19. data/lib/action_view/helpers/csp_helper.rb +4 -2
  20. data/lib/action_view/helpers/csrf_helper.rb +1 -1
  21. data/lib/action_view/helpers/date_helper.rb +73 -30
  22. data/lib/action_view/helpers/form_helper.rb +305 -37
  23. data/lib/action_view/helpers/form_options_helper.rb +23 -23
  24. data/lib/action_view/helpers/form_tag_helper.rb +19 -16
  25. data/lib/action_view/helpers/javascript_helper.rb +12 -11
  26. data/lib/action_view/helpers/number_helper.rb +14 -8
  27. data/lib/action_view/helpers/output_safety_helper.rb +1 -1
  28. data/lib/action_view/helpers/rendering_helper.rb +17 -7
  29. data/lib/action_view/helpers/sanitize_helper.rb +12 -18
  30. data/lib/action_view/helpers/tag_helper.rb +100 -55
  31. data/lib/action_view/helpers/tags/base.rb +18 -11
  32. data/lib/action_view/helpers/tags/check_box.rb +0 -1
  33. data/lib/action_view/helpers/tags/collection_check_boxes.rb +0 -1
  34. data/lib/action_view/helpers/tags/collection_helpers.rb +0 -1
  35. data/lib/action_view/helpers/tags/collection_radio_buttons.rb +0 -1
  36. data/lib/action_view/helpers/tags/color_field.rb +1 -2
  37. data/lib/action_view/helpers/tags/date_field.rb +1 -2
  38. data/lib/action_view/helpers/tags/date_select.rb +2 -3
  39. data/lib/action_view/helpers/tags/datetime_field.rb +0 -1
  40. data/lib/action_view/helpers/tags/datetime_local_field.rb +1 -2
  41. data/lib/action_view/helpers/tags/label.rb +4 -1
  42. data/lib/action_view/helpers/tags/month_field.rb +1 -2
  43. data/lib/action_view/helpers/tags/radio_button.rb +0 -1
  44. data/lib/action_view/helpers/tags/select.rb +1 -2
  45. data/lib/action_view/helpers/tags/text_field.rb +0 -1
  46. data/lib/action_view/helpers/tags/time_field.rb +1 -2
  47. data/lib/action_view/helpers/tags/translator.rb +1 -6
  48. data/lib/action_view/helpers/tags/week_field.rb +1 -2
  49. data/lib/action_view/helpers/text_helper.rb +4 -5
  50. data/lib/action_view/helpers/translation_helper.rb +94 -54
  51. data/lib/action_view/helpers/url_helper.rb +136 -28
  52. data/lib/action_view/helpers.rb +0 -2
  53. data/lib/action_view/layouts.rb +8 -10
  54. data/lib/action_view/log_subscriber.rb +30 -15
  55. data/lib/action_view/lookup_context.rb +63 -35
  56. data/lib/action_view/path_set.rb +3 -12
  57. data/lib/action_view/railtie.rb +42 -26
  58. data/lib/action_view/record_identifier.rb +2 -3
  59. data/lib/action_view/renderer/abstract_renderer.rb +142 -11
  60. data/lib/action_view/renderer/collection_renderer.rb +196 -0
  61. data/lib/action_view/renderer/object_renderer.rb +34 -0
  62. data/lib/action_view/renderer/partial_renderer/collection_caching.rb +61 -16
  63. data/lib/action_view/renderer/partial_renderer.rb +21 -273
  64. data/lib/action_view/renderer/renderer.rb +59 -4
  65. data/lib/action_view/renderer/streaming_template_renderer.rb +10 -8
  66. data/lib/action_view/renderer/template_renderer.rb +35 -27
  67. data/lib/action_view/rendering.rb +54 -33
  68. data/lib/action_view/routing_url_for.rb +13 -12
  69. data/lib/action_view/template/error.rb +30 -15
  70. data/lib/action_view/template/handlers/builder.rb +2 -2
  71. data/lib/action_view/template/handlers/erb/erubi.rb +15 -9
  72. data/lib/action_view/template/handlers/erb.rb +16 -11
  73. data/lib/action_view/template/handlers/html.rb +1 -1
  74. data/lib/action_view/template/handlers/raw.rb +2 -2
  75. data/lib/action_view/template/handlers.rb +1 -1
  76. data/lib/action_view/template/html.rb +5 -6
  77. data/lib/action_view/template/inline.rb +22 -0
  78. data/lib/action_view/template/raw_file.rb +25 -0
  79. data/lib/action_view/template/renderable.rb +24 -0
  80. data/lib/action_view/template/resolver.rb +191 -150
  81. data/lib/action_view/template/sources/file.rb +17 -0
  82. data/lib/action_view/template/sources.rb +13 -0
  83. data/lib/action_view/template/text.rb +2 -3
  84. data/lib/action_view/template.rb +66 -75
  85. data/lib/action_view/test_case.rb +21 -29
  86. data/lib/action_view/testing/resolvers.rb +18 -27
  87. data/lib/action_view/unbound_template.rb +31 -0
  88. data/lib/action_view/view_paths.rb +59 -38
  89. data/lib/action_view.rb +7 -2
  90. data/lib/assets/compiled/rails-ujs.js +32 -6
  91. metadata +29 -18
  92. data/lib/action_view/helpers/record_tag_helper.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b2a6c8b465b9914ab6831b8972018525cb2fc2a0c7f950a693ba7895ff52923
4
- data.tar.gz: 1e9b4548ad481fed3e2b7dec7d256a611e858c8eee70e118d38daaa93f72f7b8
3
+ metadata.gz: fe53fe4c85e73a08f9dcadefd08ce267e0617f6336ee0bf758757e35ac11224c
4
+ data.tar.gz: 9f82b0e20785f3775159cf270571c612321402ac935aedb228b948c13177a1a5
5
5
  SHA512:
6
- metadata.gz: a2e838a423037a30cf4e4e12e8aab64c8e8493f1a370f921be0f7cfbfa92669da4f13cf7cd3c03c42d2c3a2f516b661ba1ca7baa4cf409bf3709b12d3b9692af
7
- data.tar.gz: a705450df376aa7abcdd1762ee4f5a9cfc3165bd5102c7c82a7209f8910bd8d46f52d014c3a3feb5f22bfac327414dfeacd75d948b0e2f0ae5d746f0aab71dc7
6
+ metadata.gz: 2084fd88f1356420e4a4fef1725ff780c5db3e916c473079cf52ea775b7f8891928e03878b8a1881cc0ea901429712b86934217e85b486b4d51ee2a0046bedd2
7
+ data.tar.gz: 7ad9a864dd2dc237229a0f23f4f45951c215e13d0d35b4bdfe662635132861c37a91728f60578048f5d778fad5ff044fc31f10bac73962447d4992efa7e584a7
data/CHANGELOG.md CHANGED
@@ -1,237 +1,375 @@
1
- ## Rails 5.2.7.1 (April 26, 2022) ##
1
+ ## Rails 6.1.4.6 (February 11, 2022) ##
2
+
3
+ * No changes.
2
4
 
3
- * Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
4
5
 
5
- Escape dangerous characters in names of tags and names of attributes in the
6
- tag helpers, following the XML specification. Rename the option
7
- `:escape_attributes` to `:escape`, to simplify by applying the option to the
8
- whole tag.
6
+ ## Rails 6.1.4.5 (February 11, 2022) ##
9
7
 
10
- *Álvaro Martín Fraguas*
8
+ * No changes.
11
9
 
12
10
 
13
- ## Rails 5.2.7 (March 10, 2022) ##
11
+ ## Rails 6.1.4.4 (December 15, 2021) ##
14
12
 
15
13
  * No changes.
16
14
 
17
15
 
18
- ## Rails 5.2.6.3 (March 08, 2022) ##
16
+ ## Rails 6.1.4.3 (December 14, 2021) ##
19
17
 
20
18
  * No changes.
21
19
 
22
20
 
23
- ## Rails 5.2.6.2 (February 11, 2022) ##
21
+ ## Rails 6.1.4.2 (December 14, 2021) ##
24
22
 
25
23
  * No changes.
26
24
 
27
25
 
28
- ## Rails 5.2.6.1 (February 11, 2022) ##
26
+ ## Rails 6.1.4.1 (August 19, 2021) ##
29
27
 
30
28
  * No changes.
31
29
 
32
30
 
33
- ## Rails 5.2.6 (May 05, 2021) ##
31
+ ## Rails 6.1.4 (June 24, 2021) ##
32
+
33
+ * The `translate` helper now passes `default` values that aren't
34
+ translation keys through `I18n.translate` for interpolation.
35
+
36
+ *Jonathan Hefner*
37
+
38
+ * Don't attach UJS form submission handlers to Turbo forms.
39
+
40
+ *David Heinemeier Hansson*
41
+
42
+ * Allow both `current_page?(url_hash)` and `current_page?(**url_hash)` on Ruby 2.7.
43
+
44
+ *Ryuta Kamizono*
45
+
46
+
47
+ ## Rails 6.1.3.2 (May 05, 2021) ##
34
48
 
35
49
  * No changes.
36
50
 
37
51
 
38
- ## Rails 5.2.5 (March 26, 2021) ##
52
+ ## Rails 6.1.3.1 (March 26, 2021) ##
39
53
 
40
54
  * No changes.
41
55
 
42
56
 
43
- ## Rails 5.2.4.6 (May 05, 2021) ##
57
+ ## Rails 6.1.3 (February 17, 2021) ##
44
58
 
45
59
  * No changes.
46
60
 
47
61
 
48
- ## Rails 5.2.4.5 (February 10, 2021) ##
62
+ ## Rails 6.1.2.1 (February 10, 2021) ##
49
63
 
50
64
  * No changes.
51
65
 
52
66
 
53
- ## Rails 5.2.4.4 (September 09, 2020) ##
67
+ ## Rails 6.1.2 (February 09, 2021) ##
54
68
 
55
- * [CVE-2020-15169] Fix potential XSS vulnerability in the `translate`/`t` helper
69
+ * No changes.
70
+
71
+
72
+ ## Rails 6.1.1 (January 07, 2021) ##
73
+
74
+ * Fix lazy translation in partial with block.
75
+
76
+ *Marek Kasztelnik*
77
+
78
+ * Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
79
+
80
+ *aar0nr*
81
+
82
+ * Link preloading keep integrity hashes in the header.
83
+
84
+ *Étienne Barrié*
85
+
86
+ * Add `config.action_view.preload_links_header` to allow disabling of
87
+ the `Link` header being added by default when using `stylesheet_link_tag`
88
+ and `javascript_include_tag`.
89
+
90
+ *Andrew White*
91
+
92
+ * The `translate` helper now resolves `default` values when a `nil` key is
93
+ specified, instead of always returning `nil`.
56
94
 
57
95
  *Jonathan Hefner*
58
96
 
59
97
 
60
- ## Rails 5.2.4.3 (May 18, 2020) ##
98
+ ## Rails 6.1.0 (December 09, 2020) ##
61
99
 
62
- * [CVE-2020-8167] Check that request is same-origin prior to including CSRF token in XHRs
100
+ * SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
101
+ call safe_list_sanitizer's class method
63
102
 
103
+ Fixes #39586
64
104
 
65
- ## Rails 5.2.4.2 (March 19, 2020) ##
105
+ *Taufiq Muhammadi*
66
106
 
67
- * Fix possible XSS vector in `escape_javascript` helper
107
+ * Change form_with to generate non-remote forms by default.
68
108
 
69
- CVE-2020-5267
109
+ `form_with` would generate a remote form by default. This would confuse
110
+ users because they were forced to handle remote requests.
70
111
 
71
- *Aaron Patterson*
112
+ All new 6.1 applications will generate non-remote forms by default.
113
+ When upgrading a 6.0 application you can enable remote forms by default by
114
+ setting `config.action_view.form_with_generates_remote_forms` to `true`.
72
115
 
116
+ *Petrik de Heus*
73
117
 
74
- ## Rails 5.2.4.1 (December 18, 2019) ##
118
+ * Yield translated strings to calls of `ActionView::FormBuilder#button`
119
+ when a block is given.
75
120
 
76
- * No changes.
121
+ *Sean Doyle*
77
122
 
123
+ * Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
124
+ `#to_s` so that `form.label` calls can yield that value to their blocks.
78
125
 
79
- ## Rails 5.2.4 (November 27, 2019) ##
126
+ *Sean Doyle*
80
127
 
81
- * Allow programmatic click events to trigger Rails UJS click handlers.
82
- Programmatic click events (eg. ones generated by `Rails.fire(link, "click")`) don't specify a button. These events were being incorrectly stopped by code meant to ignore scroll wheel and right clicks introduced in #34573.
128
+ * Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
129
+ and make the original available as an alias.
83
130
 
84
- *Sudara Williams*
131
+ token_list("foo", "foo bar")
132
+ # => "foo bar"
85
133
 
134
+ *Sean Doyle*
86
135
 
87
- ## Rails 5.2.3 (March 27, 2019) ##
136
+ * ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
137
+ values. This is useful when declaring lists of label text identifiers in
138
+ `aria-labelledby` or `aria-describedby`.
88
139
 
89
- * Prevent non-primary mouse keys from triggering Rails UJS click handlers.
90
- Firefox fires click events even if the click was triggered by non-primary mouse keys such as right- or scroll-wheel-clicks.
91
- For example, right-clicking a link such as the one described below (with an underlying ajax request registered on click) should not cause that request to occur.
140
+ tag.input type: 'checkbox', name: 'published', aria: {
141
+ invalid: @post.errors[:published].any?,
142
+ labelledby: ['published_context', 'published_label'],
143
+ describedby: { published_errors: @post.errors[:published].any? }
144
+ }
145
+ #=> <input
146
+ type="checkbox" name="published" aria-invalid="true"
147
+ aria-labelledby="published_context published_label"
148
+ aria-describedby="published_errors"
149
+ >
92
150
 
93
- ```
94
- <%= link_to 'Remote', remote_path, class: 'remote', remote: true, data: { type: :json } %>
95
- ```
151
+ *Sean Doyle*
96
152
 
97
- Fixes #34541
153
+ * Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
98
154
 
99
- *Wolfgang Hobmaier*
155
+ *Rafael Mendonça França*
100
156
 
157
+ * Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
101
158
 
102
- ## Rails 5.2.2.1 (March 11, 2019) ##
159
+ *Rafael Mendonça França*
103
160
 
104
- * Only accept formats from registered mime types
161
+ * Remove deprecated `formats` from `ActionView::Template::HTML`.
105
162
 
106
- A lack of filtering on mime types could allow an attacker to read
107
- arbitrary files on the target server or to perform a denial of service
108
- attack.
163
+ *Rafael Mendonça França*
109
164
 
110
- Fixes CVE-2019-5418
111
- Fixes CVE-2019-5419
165
+ * Remove deprecated `formats` from `ActionView::Template::RawFile`.
112
166
 
113
- *John Hawthorn*, *Eileen M. Uchitelle*, *Aaron Patterson*
167
+ *Rafael Mendonça França*
114
168
 
169
+ * Remove deprecated `formats` from `ActionView::Template::Text`.
115
170
 
116
- ## Rails 5.2.2 (December 04, 2018) ##
171
+ *Rafael Mendonça França*
117
172
 
118
- * No changes.
173
+ * Remove deprecated `find_file` from `ActionView::PathSet`.
119
174
 
175
+ *Rafael Mendonça França*
120
176
 
121
- ## Rails 5.2.1.1 (November 27, 2018) ##
177
+ * Remove deprecated `rendered_format` from `ActionView::LookupContext`.
122
178
 
123
- * No changes.
179
+ *Rafael Mendonça França*
180
+
181
+ * Remove deprecated `find_file` from `ActionView::ViewPaths`.
182
+
183
+ *Rafael Mendonça França*
184
+
185
+ * Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
186
+
187
+ *Rafael Mendonça França*
188
+
189
+ * Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
190
+ in `ActionView::Base#initialize`.
191
+
192
+ *Rafael Mendonça França*
124
193
 
194
+ * Remove deprecated `format` argument `ActionView::Base#initialize`.
125
195
 
126
- ## Rails 5.2.1 (August 07, 2018) ##
196
+ *Rafael Mendonça França*
127
197
 
128
- * Fix leak of `skip_default_ids` and `allow_method_names_outside_object` options
129
- to HTML attributes.
198
+ * Remove deprecated `ActionView::Template#refresh`.
130
199
 
131
- *Yurii Cherniavskyi*
200
+ *Rafael Mendonça França*
132
201
 
133
- * Fix issue with `button_to`'s `to_form_params`
202
+ * Remove deprecated `ActionView::Template#original_encoding`.
134
203
 
135
- `button_to` was throwing exception when invoked with `params` hash that
136
- contains symbol and string keys. The reason for the exception was that
137
- `to_form_params` was comparing the given symbol and string keys.
204
+ *Rafael Mendonça França*
138
205
 
139
- The issue is fixed by turning all keys to strings inside
140
- `to_form_params` before comparing them.
206
+ * Remove deprecated `ActionView::Template#variants`.
141
207
 
142
- *Georgi Georgiev*
208
+ *Rafael Mendonça França*
143
209
 
144
- * Fix JavaScript views rendering does not work with Firefox when using
145
- Content Security Policy.
210
+ * Remove deprecated `ActionView::Template#formats`.
146
211
 
147
- Fixes #32577.
212
+ *Rafael Mendonça França*
148
213
 
149
- *Yuji Yaginuma*
214
+ * Remove deprecated `ActionView::Template#virtual_path=`.
150
215
 
151
- * Add the `nonce: true` option for `javascript_include_tag` helper to
152
- support automatic nonce generation for Content Security Policy.
153
- Works the same way as `javascript_tag nonce: true` does.
216
+ *Rafael Mendonça França*
154
217
 
155
- *Yaroslav Markin*
218
+ * Remove deprecated `ActionView::Template#updated_at`.
156
219
 
220
+ *Rafael Mendonça França*
157
221
 
158
- ## Rails 5.2.0 (April 09, 2018) ##
222
+ * Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
159
223
 
160
- * Pass the `:skip_pipeline` option in `image_submit_tag` when calling `path_to_image`.
224
+ *Rafael Mendonça França*
161
225
 
162
- Fixes #32248.
226
+ * Make `locals` argument required on `ActionView::Template#initialize`.
163
227
 
164
- *Andrew White*
228
+ *Rafael Mendonça França*
165
229
 
166
- * Allow the use of callable objects as group methods for grouped selects.
230
+ * Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
167
231
 
168
- Until now, the `option_groups_from_collection_for_select` method was only able to
169
- handle method names as `group_method` and `group_label_method` parameters,
170
- it is now able to receive procs and other callable objects too.
232
+ *Rafael Mendonça França*
171
233
 
172
- *Jérémie Bonal*
234
+ * Remove deprecated `config.action_view.finalize_compiled_template_methods`
173
235
 
174
- * Add `preload_link_tag` helper.
236
+ *Rafael Mendonça França*
175
237
 
176
- This helper that allows to the browser to initiate early fetch of resources
177
- (different to the specified in `javascript_include_tag` and `stylesheet_link_tag`).
178
- Additionally, this sends Early Hints if supported by browser.
238
+ * Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
179
239
 
180
- *Guillermo Iguaran*
240
+ *Rafael Mendonça França*
181
241
 
182
- * Change `form_with` to generates ids by default.
242
+ * Remove deprecated support to passing absolute paths to `render template:`.
183
243
 
184
- When `form_with` was introduced we disabled the automatic generation of ids
185
- that was enabled in `form_for`. This usually is not an good idea since labels don't work
186
- when the input doesn't have an id and it made harder to test with Capybara.
244
+ *Rafael Mendonça França*
187
245
 
188
- You can still disable the automatic generation of ids setting `config.action_view.form_with_generates_ids`
189
- to `false.`
246
+ * Remove deprecated support to passing relative paths to `render file:`.
190
247
 
191
- *Nick Pezza*
248
+ *Rafael Mendonça França*
192
249
 
193
- * Fix issues with `field_error_proc` wrapping `optgroup` and select divider `option`.
250
+ * Remove support to template handlers that don't accept two arguments.
194
251
 
195
- Fixes #31088
252
+ *Rafael Mendonça França*
196
253
 
197
- *Matthias Neumayr*
254
+ * Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
198
255
 
199
- * Remove deprecated Erubis ERB handler.
256
+ *Rafael Mendonça França*
257
+
258
+ * Remove deprecated support to call private methods from object in some view helpers.
200
259
 
201
260
  *Rafael Mendonça França*
202
261
 
203
- * Remove default `alt` text generation.
262
+ * `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
263
+ the translated text and the fully resolved translation key:
264
+
265
+ <%= translate(".relative_key") do |translation, resolved_key| %>
266
+ <span title="<%= resolved_key %>"><%= translation %></span>
267
+ <% end %>
268
+
269
+ *Sean Doyle*
270
+
271
+ * Ensure cache fragment digests include all relevant template dependencies when
272
+ fragments are contained in a block passed to the render helper. Remove the
273
+ virtual_path keyword arguments found in CacheHelper as they no longer possess
274
+ any function following 1581cab.
275
+
276
+ Fixes #38984.
277
+
278
+ *Aaron Lipman*
279
+
280
+ * Deprecate `config.action_view.raise_on_missing_translations` in favor of
281
+ `config.i18n.raise_on_missing_translations`.
282
+
283
+ New generalized configuration option now determines whether an error should be raised
284
+ for missing translations in controllers and views.
285
+
286
+ *fatkodima*
287
+
288
+ * Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
289
+ and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
290
+
291
+ *Zach Kemp*
292
+
293
+ * `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
294
+
295
+ *Joel Hawksley*, *Aaron Patterson*
296
+
297
+ * `ActionView::Helpers::TranslationHelper#translate` returns nil when
298
+ passed `default: nil` without a translation matching `I18n#translate`.
299
+
300
+ *Stefan Wrobel*
301
+
302
+ * `OptimizedFileSystemResolver` prefers template details in order of locale,
303
+ formats, variants, handlers.
304
+
305
+ *Iago Pimenta*
306
+
307
+ * Added `class_names` helper to create a CSS class value with conditional classes.
308
+
309
+ *Joel Hawksley*, *Aaron Patterson*
310
+
311
+ * Add support for conditional values to TagBuilder.
312
+
313
+ *Joel Hawksley*
314
+
315
+ * `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
316
+
317
+ ```ruby
318
+ @post = Post.new
319
+ @post.category = nil
320
+
321
+ # Before
322
+ select("post", "category", none: nil, programming: 1, economics: 2)
323
+ # =>
324
+ # <select name="post[category]" id="post_category">
325
+ # <option value="">none</option>
326
+ # <option value="1">programming</option>
327
+ # <option value="2">economics</option>
328
+ # </select>
329
+
330
+ # After
331
+ select("post", "category", none: nil, programming: 1, economics: 2)
332
+ # =>
333
+ # <select name="post[category]" id="post_category">
334
+ # <option selected="selected" value="">none</option>
335
+ # <option value="1">programming</option>
336
+ # <option value="2">economics</option>
337
+ # </select>
338
+ ```
339
+
340
+ *bogdanvlviv*
204
341
 
205
- Fixes #30096
342
+ * Log lines for partial renders and started template renders are now
343
+ emitted at the `DEBUG` level instead of `INFO`.
206
344
 
207
- *Cameron Cundiff*
345
+ Completed template renders are still logged at the `INFO` level.
208
346
 
209
- * Add `srcset` option to `image_tag` helper.
347
+ *DHH*
210
348
 
211
- *Roberto Miranda*
349
+ * ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
212
350
 
213
- * Fix issues with scopes and engine on `current_page?` method.
351
+ *Juanito Fatas*
214
352
 
215
- Fixes #29401.
353
+ * Added `phone_to` helper method to create a link from mobile numbers.
216
354
 
217
- *Nikita Savrov*
355
+ *Pietro Moro*
218
356
 
219
- * Generate field ids in `collection_check_boxes` and `collection_radio_buttons`.
357
+ * annotated_source_code returns an empty array so TemplateErrors without a
358
+ template in the backtrace are surfaced properly by DebugExceptions.
220
359
 
221
- This makes sure that the labels are linked up with the fields.
360
+ *Guilherme Mansur*, *Kasper Timm Hansen*
222
361
 
223
- Fixes #29014.
362
+ * Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
224
363
 
225
- *Yuji Yaginuma*
364
+ *Guilherme Mansur*, *Gannon McGibbon*
226
365
 
227
- * Add `:json` type to `auto_discovery_link_tag` to support [JSON Feeds](https://jsonfeed.org/version/1).
366
+ * `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
228
367
 
229
- *Mike Gunderloy*
368
+ *Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
230
369
 
231
- * Update `distance_of_time_in_words` helper to display better error messages
232
- for bad input.
370
+ * Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
233
371
 
234
- *Jay Hayes*
372
+ *Younes SERRAJ*
235
373
 
236
374
 
237
- Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/actionview/CHANGELOG.md) for previous changes.
375
+ Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actionview/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2004-2018 David Heinemeier Hansson
1
+ Copyright (c) 2004-2020 David Heinemeier Hansson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -5,6 +5,8 @@ view helpers that assist when building HTML forms, Atom feeds and more.
5
5
  Template formats that Action View handles are ERB (embedded Ruby, typically
6
6
  used to inline short Ruby snippets inside HTML), and XML Builder.
7
7
 
8
+ You can read more about Action View in the {Action View Overview}[https://edgeguides.rubyonrails.org/action_view_overview.html] guide.
9
+
8
10
  == Download and installation
9
11
 
10
12
  The latest version of Action View can be installed with RubyGems:
@@ -13,7 +15,7 @@ The latest version of Action View can be installed with RubyGems:
13
15
 
14
16
  Source code can be downloaded as part of the Rails project on GitHub:
15
17
 
16
- * https://github.com/rails/rails/tree/5-2-stable/actionview
18
+ * https://github.com/rails/rails/tree/main/actionview
17
19
 
18
20
 
19
21
  == License
@@ -27,7 +29,7 @@ Action View is released under the MIT license:
27
29
 
28
30
  API documentation is at
29
31
 
30
- * http://api.rubyonrails.org
32
+ * https://api.rubyonrails.org
31
33
 
32
34
  Bug reports for the Ruby on Rails project can be filed here:
33
35
 
@@ -35,4 +37,4 @@ Bug reports for the Ruby on Rails project can be filed here:
35
37
 
36
38
  Feature requests should be discussed on the rails-core mailing list here:
37
39
 
38
- * https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core
40
+ * https://discuss.rubyonrails.org/c/rubyonrails-core