actionview 4.2.11.1 → 6.1.5.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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +243 -186
  3. data/MIT-LICENSE +1 -2
  4. data/README.rdoc +9 -8
  5. data/lib/action_view/base.rb +115 -39
  6. data/lib/action_view/buffers.rb +18 -1
  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 -85
  11. data/lib/action_view/flows.rb +11 -12
  12. data/lib/action_view/gem_version.rb +5 -3
  13. data/lib/action_view/helpers/active_model_helper.rb +16 -11
  14. data/lib/action_view/helpers/asset_tag_helper.rb +282 -83
  15. data/lib/action_view/helpers/asset_url_helper.rb +175 -69
  16. data/lib/action_view/helpers/atom_feed_helper.rb +20 -17
  17. data/lib/action_view/helpers/cache_helper.rb +107 -43
  18. data/lib/action_view/helpers/capture_helper.rb +20 -13
  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 +232 -130
  23. data/lib/action_view/helpers/debug_helper.rb +7 -6
  24. data/lib/action_view/helpers/form_helper.rb +808 -146
  25. data/lib/action_view/helpers/form_options_helper.rb +124 -78
  26. data/lib/action_view/helpers/form_tag_helper.rb +120 -74
  27. data/lib/action_view/helpers/javascript_helper.rb +33 -17
  28. data/lib/action_view/helpers/number_helper.rb +87 -62
  29. data/lib/action_view/helpers/output_safety_helper.rb +36 -4
  30. data/lib/action_view/helpers/rendering_helper.rb +21 -10
  31. data/lib/action_view/helpers/sanitize_helper.rb +30 -31
  32. data/lib/action_view/helpers/tag_helper.rb +302 -69
  33. data/lib/action_view/helpers/tags/base.rb +141 -97
  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 -34
  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 +4 -3
  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 +6 -0
  50. data/lib/action_view/helpers/tags/label.rb +7 -2
  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 +3 -1
  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 +14 -9
  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 +4 -2
  61. data/lib/action_view/helpers/tags/text_field.rb +8 -8
  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 +15 -16
  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 +3 -1
  69. data/lib/action_view/helpers/text_helper.rb +56 -38
  70. data/lib/action_view/helpers/translation_helper.rb +150 -68
  71. data/lib/action_view/helpers/url_helper.rb +284 -117
  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 +77 -10
  75. data/lib/action_view/lookup_context.rb +134 -91
  76. data/lib/action_view/model_naming.rb +3 -1
  77. data/lib/action_view/path_set.rb +26 -24
  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 +151 -14
  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 +55 -303
  85. data/lib/action_view/renderer/renderer.rb +66 -9
  86. data/lib/action_view/renderer/streaming_template_renderer.rb +58 -54
  87. data/lib/action_view/renderer/template_renderer.rb +82 -73
  88. data/lib/action_view/rendering.rb +71 -45
  89. data/lib/action_view/routing_url_for.rb +34 -23
  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 +12 -8
  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 +263 -197
  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 +108 -92
  108. data/lib/action_view/test_case.rb +66 -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 +73 -58
  113. data/lib/action_view.rb +14 -8
  114. data/lib/assets/compiled/rails-ujs.js +746 -0
  115. metadata +45 -32
  116. data/lib/action_view/helpers/record_tag_helper.rb +0 -108
  117. data/lib/action_view/tasks/dependencies.rake +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71fb7b73001ccc9220ba0da089fc3336a3a18620ca13a18730fa91d4799fbf58
4
- data.tar.gz: a87ef6a72900a81c7cff2d00f3fac65006c0f95935b7bf366c1f4bfa1210b6d1
3
+ metadata.gz: 347465d701c1688d4e91d033d1f29b16f6f284005f9aaeefc71a36ef0ff439a8
4
+ data.tar.gz: de5710a75c9b8aa8bcf02e34bb62efc0818f9069c71600a8b50cedf31c0ed94f
5
5
  SHA512:
6
- metadata.gz: ea93cb6a5de3af579900cf1534b50842c6d197062ee7a01a9f499287dbbb8f6f3d9c32abfadba3c2d1868b8deddc70594c3e5767744031e47961d5da15cb5e54
7
- data.tar.gz: e59b44cf756ed5bf55ef96709055a04413dfba03fa083c32ef709eb266267ac774bc7d83c08c696a16c98e5dd93a412a531372eee7546bcc8e856e1304dcf618
6
+ metadata.gz: cbe1e77c8db14198627aafa50b6e8438446828ddf6ecfed37732fb2cc72db2ff03a344a8bee860677a98eb2d6d85875b626b7119e92ac20884631547e7957309
7
+ data.tar.gz: 890f5eb3fa70152816e5397b39745836ad36efe145eeff80df744dfc09878abbaa3707472eeb53025049dc3ab4e02e0766668ea56cd658f001f9a3f4a3b8514b
data/CHANGELOG.md CHANGED
@@ -1,357 +1,414 @@
1
- ## Rails 4.2.11.1 (March 11, 2019) ##
1
+ ## Rails 6.1.5.1 (April 26, 2022) ##
2
+
3
+ * Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
4
+
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.
9
+
10
+ *Álvaro Martín Fraguas*
11
+
12
+ ## Rails 6.1.5 (March 09, 2022) ##
13
+
14
+ * `preload_link_tag` properly inserts `as` attributes for files with `image` MIME
15
+ types, such as JPG or SVG.
16
+
17
+ *Nate Berkopec*
18
+
19
+ * Add `autocomplete="off"` to all generated hidden fields.
20
+
21
+ Fixes #42610.
22
+
23
+ *Ryan Baumann*
24
+
25
+ * Fix `current_page?` when URL has trailing slash.
26
+
27
+ This fixes the `current_page?` helper when the given URL has a trailing slash,
28
+ and is an absolute URL or also has query params.
29
+
30
+ Fixes #33956.
31
+
32
+ *Jonathan Hefner*
33
+
34
+
35
+ ## Rails 6.1.4.7 (March 08, 2022) ##
2
36
 
3
37
  * No changes.
4
38
 
5
39
 
6
- ## Rails 4.2.11 (November 27, 2018) ##
40
+ ## Rails 6.1.4.6 (February 11, 2022) ##
7
41
 
8
42
  * No changes.
9
43
 
10
44
 
11
- ## Rails 4.2.10 (September 27, 2017) ##
45
+ ## Rails 6.1.4.5 (February 11, 2022) ##
12
46
 
13
47
  * No changes.
14
48
 
15
49
 
16
- ## Rails 4.2.9 (June 26, 2017) ##
50
+ ## Rails 6.1.4.4 (December 15, 2021) ##
17
51
 
18
52
  * No changes.
19
53
 
20
54
 
21
- ## Rails 4.2.8 (February 21, 2017) ##
55
+ ## Rails 6.1.4.3 (December 14, 2021) ##
22
56
 
23
57
  * No changes.
24
58
 
25
59
 
26
- ## Rails 4.2.7 (July 12, 2016) ##
60
+ ## Rails 6.1.4.2 (December 14, 2021) ##
27
61
 
28
62
  * No changes.
29
63
 
30
64
 
31
- ## Rails 4.2.6 (March 07, 2016) ##
65
+ ## Rails 6.1.4.1 (August 19, 2021) ##
32
66
 
33
- * Fix stripping the digest from the automatically generated img tag alt
34
- attribute when assets are handled by Sprockets >=3.0.
67
+ * No changes.
35
68
 
36
- *Bart de Water*
37
69
 
38
- * Create a new `ActiveSupport::SafeBuffer` instance when `content_for` is flushed.
70
+ ## Rails 6.1.4 (June 24, 2021) ##
39
71
 
40
- Fixes #19890
72
+ * The `translate` helper now passes `default` values that aren't
73
+ translation keys through `I18n.translate` for interpolation.
41
74
 
42
- *Yoong Kang Lim*
75
+ *Jonathan Hefner*
43
76
 
44
- * Respect value of `:object` if `:object` is false when rendering.
77
+ * Don't attach UJS form submission handlers to Turbo forms.
45
78
 
46
- Fixes #22260.
79
+ *David Heinemeier Hansson*
47
80
 
48
- *Yuichiro Kaneko*
81
+ * Allow both `current_page?(url_hash)` and `current_page?(**url_hash)` on Ruby 2.7.
49
82
 
50
- * Generate `week_field` input values using a 1-based index and not a 0-based index
51
- as per the W3 spec: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
83
+ *Ryuta Kamizono*
52
84
 
53
- *Christoph Geschwind*
54
85
 
86
+ ## Rails 6.1.3.2 (May 05, 2021) ##
55
87
 
56
- ## Rails 4.2.5.2 (February 26, 2016) ##
88
+ * No changes.
57
89
 
58
- * Do not allow render with unpermitted parameter.
59
90
 
60
- Fixes CVE-2016-2098.
91
+ ## Rails 6.1.3.1 (March 26, 2021) ##
61
92
 
62
- *Arthur Neves*
93
+ * No changes.
63
94
 
64
95
 
65
- ## Rails 4.2.5.1 (January 25, 2015) ##
96
+ ## Rails 6.1.3 (February 17, 2021) ##
66
97
 
67
- * Adds boolean argument outside_app_allowed to `ActionView::Resolver#find_templates`
68
- method.
98
+ * No changes.
69
99
 
70
- *Aaron Patterson*
71
100
 
101
+ ## Rails 6.1.2.1 (February 10, 2021) ##
72
102
 
73
- ## Rails 4.2.5 (November 12, 2015) ##
103
+ * No changes.
74
104
 
75
- * Fix `mail_to` when called with `nil` as argument.
76
105
 
77
- *Rafael Mendonça França*
106
+ ## Rails 6.1.2 (February 09, 2021) ##
78
107
 
79
- * `url_for` does not modify its arguments when generating polymorphic URLs.
108
+ * No changes.
80
109
 
81
- *Bernerd Schaefer*
82
110
 
111
+ ## Rails 6.1.1 (January 07, 2021) ##
83
112
 
84
- ## Rails 4.2.4 (August 24, 2015) ##
113
+ * Fix lazy translation in partial with block.
85
114
 
86
- * No Changes *
115
+ *Marek Kasztelnik*
87
116
 
117
+ * Avoid extra `SELECT COUNT` queries when rendering Active Record collections.
88
118
 
89
- ## Rails 4.2.3 (June 25, 2015) ##
119
+ *aar0nr*
90
120
 
91
- * `translate` should handle `raise` flag correctly in case of both main and default
92
- translation is missing.
121
+ * Link preloading keep integrity hashes in the header.
93
122
 
94
- Fixes #19967
123
+ *Étienne Barrié*
95
124
 
96
- *Bernard Potocki*
125
+ * Add `config.action_view.preload_links_header` to allow disabling of
126
+ the `Link` header being added by default when using `stylesheet_link_tag`
127
+ and `javascript_include_tag`.
97
128
 
98
- * `translate` allows `default: [[]]` again for a default value of `[]`.
129
+ *Andrew White*
99
130
 
100
- Fixes #19640.
131
+ * The `translate` helper now resolves `default` values when a `nil` key is
132
+ specified, instead of always returning `nil`.
101
133
 
102
- *Adam Prescott*
134
+ *Jonathan Hefner*
103
135
 
104
- * `translate` should accept nils as members of the `:default`
105
- parameter without raising a translation missing error. Fixes a
106
- regression introduced 362557e.
107
136
 
108
- Fixes #19419
137
+ ## Rails 6.1.0 (December 09, 2020) ##
109
138
 
110
- *Justin Coyne*
139
+ * SanitizeHelper.sanitized_allowed_attributes and SanitizeHelper.sanitized_allowed_tags
140
+ call safe_list_sanitizer's class method
111
141
 
112
- * `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
113
- as input when `precision: 0` is used.
142
+ Fixes #39586
114
143
 
115
- Fixes #19227.
144
+ *Taufiq Muhammadi*
116
145
 
117
- *Yves Senn*
146
+ * Change form_with to generate non-remote forms by default.
118
147
 
148
+ `form_with` would generate a remote form by default. This would confuse
149
+ users because they were forced to handle remote requests.
119
150
 
120
- ## Rails 4.2.2 (June 16, 2015) ##
151
+ All new 6.1 applications will generate non-remote forms by default.
152
+ When upgrading a 6.0 application you can enable remote forms by default by
153
+ setting `config.action_view.form_with_generates_remote_forms` to `true`.
121
154
 
122
- * No Changes *
155
+ *Petrik de Heus*
123
156
 
157
+ * Yield translated strings to calls of `ActionView::FormBuilder#button`
158
+ when a block is given.
124
159
 
125
- ## Rails 4.2.1 (March 19, 2015) ##
160
+ *Sean Doyle*
126
161
 
127
- * Default translations that have a lower precedence than an html safe default,
128
- but are not themselves safe, should not be marked as html_safe.
162
+ * Alias `ActionView::Helpers::Tags::Label::LabelBuilder#translation` to
163
+ `#to_s` so that `form.label` calls can yield that value to their blocks.
129
164
 
130
- *Justin Coyne*
165
+ *Sean Doyle*
131
166
 
132
- * Added an explicit error message, in `ActionView::PartialRenderer`
133
- for partial `rendering`, when the value of option `as` has invalid characters.
167
+ * Rename the new `TagHelper#class_names` method to `TagHelper#token_list`,
168
+ and make the original available as an alias.
134
169
 
135
- *Angelo Capilleri*
170
+ token_list("foo", "foo bar")
171
+ # => "foo bar"
136
172
 
173
+ *Sean Doyle*
137
174
 
138
- ## Rails 4.2.0 (December 20, 2014) ##
175
+ * ARIA Array and Hash attributes are treated as space separated `DOMTokenList`
176
+ values. This is useful when declaring lists of label text identifiers in
177
+ `aria-labelledby` or `aria-describedby`.
139
178
 
140
- * Local variable in a partial is now available even if a falsy value is
141
- passed to `:object` when rendering a partial.
179
+ tag.input type: 'checkbox', name: 'published', aria: {
180
+ invalid: @post.errors[:published].any?,
181
+ labelledby: ['published_context', 'published_label'],
182
+ describedby: { published_errors: @post.errors[:published].any? }
183
+ }
184
+ #=> <input
185
+ type="checkbox" name="published" aria-invalid="true"
186
+ aria-labelledby="published_context published_label"
187
+ aria-describedby="published_errors"
188
+ >
142
189
 
143
- Fixes #17373.
190
+ *Sean Doyle*
144
191
 
145
- *Agis Anastasopoulos*
192
+ * Remove deprecated `escape_whitelist` from `ActionView::Template::Handlers::ERB`.
146
193
 
147
- * Add support for `:enforce_utf8` option in `form_for`.
194
+ *Rafael Mendonça França*
148
195
 
149
- This is the same option that was added in 06388b0 to `form_tag` and allows
150
- users to skip the insertion of the UTF8 enforcer tag in a form.
196
+ * Remove deprecated `find_all_anywhere` from `ActionView::Resolver`.
151
197
 
152
- * claudiob *
198
+ *Rafael Mendonça França*
153
199
 
154
- * Fix a bug that <%= foo(){ %> and <%= foo()do %> in view templates were not regarded
155
- as Ruby block calls.
200
+ * Remove deprecated `formats` from `ActionView::Template::HTML`.
156
201
 
157
- * Akira Matsuda *
202
+ *Rafael Mendonça França*
158
203
 
159
- * Update `select_tag` to work correctly with `:include_blank` option passing a string.
204
+ * Remove deprecated `formats` from `ActionView::Template::RawFile`.
160
205
 
161
- Fixes #16483.
206
+ *Rafael Mendonça França*
162
207
 
163
- *Frank Groeneveld*
208
+ * Remove deprecated `formats` from `ActionView::Template::Text`.
164
209
 
165
- * Changed the meaning of `render "foo/bar"`.
210
+ *Rafael Mendonça França*
166
211
 
167
- Previously, calling `render "foo/bar"` in a controller action is equivalent
168
- to `render file: "foo/bar"`. In Rails 4.2, this has been changed to mean
169
- `render template: "foo/bar"` instead. If you need to render a file, please
170
- change your code to use the explicit form (`render file: "foo/bar"`) instead.
212
+ * Remove deprecated `find_file` from `ActionView::PathSet`.
171
213
 
172
- *Jeremy Jackson*
214
+ *Rafael Mendonça França*
173
215
 
174
- * Add support for ARIA attributes in tags.
216
+ * Remove deprecated `rendered_format` from `ActionView::LookupContext`.
175
217
 
176
- Example:
218
+ *Rafael Mendonça França*
177
219
 
178
- <%= f.text_field :name, aria: { required: "true", hidden: "false" } %>
220
+ * Remove deprecated `find_file` from `ActionView::ViewPaths`.
179
221
 
180
- now generates:
222
+ *Rafael Mendonça França*
181
223
 
182
- <input aria-hidden="false" aria-required="true" id="user_name" name="user[name]" type="text">
224
+ * Require that `ActionView::Base` subclasses implement `#compiled_method_container`.
183
225
 
184
- *Paola Garcia Casadiego*
226
+ *Rafael Mendonça França*
185
227
 
186
- * Provide a `builder` object when using the `label` form helper in block form.
228
+ * Remove deprecated support to pass an object that is not a `ActionView::LookupContext` as the first argument
229
+ in `ActionView::Base#initialize`.
187
230
 
188
- The new `builder` object responds to `translation`, allowing I18n fallback support
189
- when you want to customize how a particular label is presented.
231
+ *Rafael Mendonça França*
190
232
 
191
- *Alex Robbin*
233
+ * Remove deprecated `format` argument `ActionView::Base#initialize`.
192
234
 
193
- * Add I18n support for input/textarea placeholder text.
235
+ *Rafael Mendonça França*
194
236
 
195
- Placeholder I18n follows the same convention as `label` I18n.
237
+ * Remove deprecated `ActionView::Template#refresh`.
196
238
 
197
- *Alex Robbin*
239
+ *Rafael Mendonça França*
198
240
 
199
- * Fix that render layout: 'messages/layout' should also be added to the dependency tracker tree.
241
+ * Remove deprecated `ActionView::Template#original_encoding`.
200
242
 
201
- *DHH*
243
+ *Rafael Mendonça França*
202
244
 
203
- * Add `PartialIteration` object used when rendering collections.
245
+ * Remove deprecated `ActionView::Template#variants`.
204
246
 
205
- The iteration object is available as the local variable
206
- `#{template_name}_iteration` when rendering partials with collections.
247
+ *Rafael Mendonça França*
207
248
 
208
- It gives access to the `size` of the collection being iterated over,
209
- the current `index` and two convenience methods `first?` and `last?`.
249
+ * Remove deprecated `ActionView::Template#formats`.
210
250
 
211
- *Joel Junström*, *Lucas Uyezu*
251
+ *Rafael Mendonça França*
212
252
 
213
- * Return an absolute instead of relative path from an asset url in the case
214
- of the `asset_host` proc returning nil.
253
+ * Remove deprecated `ActionView::Template#virtual_path=`.
215
254
 
216
- *Jolyon Pawlyn*
255
+ *Rafael Mendonça França*
217
256
 
218
- * Fix `html_escape_once` to properly handle hex escape sequences (e.g. &#x1a2b;).
257
+ * Remove deprecated `ActionView::Template#updated_at`.
219
258
 
220
- *John F. Douthat*
259
+ *Rafael Mendonça França*
221
260
 
222
- * Added String support for min and max properties for date field helpers.
261
+ * Remove deprecated `updated_at` argument required on `ActionView::Template#initialize`.
223
262
 
224
- *Todd Bealmear*
263
+ *Rafael Mendonça França*
225
264
 
226
- * The `highlight` helper now accepts a block to be used instead of the `highlighter`
227
- option.
265
+ * Make `locals` argument required on `ActionView::Template#initialize`.
228
266
 
229
- *Lucas Mazza*
267
+ *Rafael Mendonça França*
230
268
 
231
- * The `except` and `highlight` helpers now accept regular expressions.
269
+ * Remove deprecated `ActionView::Template.finalize_compiled_template_methods`.
232
270
 
233
- *Jan Szumiec*
271
+ *Rafael Mendonça França*
234
272
 
235
- * Flatten the array parameter in `safe_join`, so it behaves consistently with
236
- `Array#join`.
273
+ * Remove deprecated `config.action_view.finalize_compiled_template_methods`
237
274
 
238
- *Paul Grayson*
275
+ *Rafael Mendonça França*
239
276
 
240
- * Honor `html_safe` on array elements in tag values, as we do for plain string
241
- values.
277
+ * Remove deprecated support to calling `ActionView::ViewPaths#with_fallback` with a block.
242
278
 
243
- *Paul Grayson*
279
+ *Rafael Mendonça França*
244
280
 
245
- * Add `ActionView::Template::Handler.unregister_template_handler`.
281
+ * Remove deprecated support to passing absolute paths to `render template:`.
246
282
 
247
- It performs the opposite of `ActionView::Template::Handler.register_template_handler`.
283
+ *Rafael Mendonça França*
248
284
 
249
- *Zuhao Wan*
285
+ * Remove deprecated support to passing relative paths to `render file:`.
250
286
 
251
- * Bring `cache_digest` rake tasks up-to-date with the latest API changes.
287
+ *Rafael Mendonça França*
252
288
 
253
- *Jiri Pospisil*
289
+ * Remove support to template handlers that don't accept two arguments.
254
290
 
255
- * Allow custom `:host` option to be passed to `asset_url` helper that
256
- overwrites `config.action_controller.asset_host` for particular asset.
291
+ *Rafael Mendonça França*
257
292
 
258
- *Hubert Łępicki*
293
+ * Remove deprecated pattern argument in `ActionView::Template::PathResolver`.
259
294
 
260
- * Deprecate `AbstractController::Base.parent_prefixes`.
261
- Override `AbstractController::Base.local_prefixes` when you want to change
262
- where to find views.
295
+ *Rafael Mendonça França*
263
296
 
264
- *Nick Sutterer*
297
+ * Remove deprecated support to call private methods from object in some view helpers.
265
298
 
266
- * Take label values into account when doing I18n lookups for model attributes.
299
+ *Rafael Mendonça França*
267
300
 
268
- The following:
301
+ * `ActionView::Helpers::TranslationHelper#translate` accepts a block, yielding
302
+ the translated text and the fully resolved translation key:
269
303
 
270
- # form.html.erb
271
- <%= form_for @post do |f| %>
272
- <%= f.label :type, value: "long" %>
304
+ <%= translate(".relative_key") do |translation, resolved_key| %>
305
+ <span title="<%= resolved_key %>"><%= translation %></span>
273
306
  <% end %>
274
307
 
275
- # en.yml
276
- en:
277
- activerecord:
278
- attributes:
279
- post/long: "Long-form Post"
308
+ *Sean Doyle*
280
309
 
281
- Used to simply return "long", but now it will return "Long-form
282
- Post".
310
+ * Ensure cache fragment digests include all relevant template dependencies when
311
+ fragments are contained in a block passed to the render helper. Remove the
312
+ virtual_path keyword arguments found in CacheHelper as they no longer possess
313
+ any function following 1581cab.
283
314
 
284
- *Joshua Cody*
315
+ Fixes #38984.
285
316
 
286
- * Change `asset_path` to use File.join to create proper paths:
317
+ *Aaron Lipman*
287
318
 
288
- Before:
319
+ * Deprecate `config.action_view.raise_on_missing_translations` in favor of
320
+ `config.i18n.raise_on_missing_translations`.
289
321
 
290
- https://some.host.com//assets/some.js
322
+ New generalized configuration option now determines whether an error should be raised
323
+ for missing translations in controllers and views.
291
324
 
292
- After:
325
+ *fatkodima*
293
326
 
294
- https://some.host.com/assets/some.js
327
+ * Instrument layout rendering in `TemplateRenderer#render_with_layout` as `render_layout.action_view`,
328
+ and include (when necessary) the layout's virtual path in notification payloads for collection and partial renders.
295
329
 
296
- *Peter Schröder*
330
+ *Zach Kemp*
297
331
 
298
- * Change `favicon_link_tag` default mimetype from `image/vnd.microsoft.icon` to
299
- `image/x-icon`.
332
+ * `ActionView::Base.annotate_rendered_view_with_filenames` annotates HTML output with template file names.
300
333
 
301
- Before:
334
+ *Joel Hawksley*, *Aaron Patterson*
302
335
 
303
- # => favicon_link_tag 'myicon.ico'
304
- <link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
336
+ * `ActionView::Helpers::TranslationHelper#translate` returns nil when
337
+ passed `default: nil` without a translation matching `I18n#translate`.
305
338
 
306
- After:
339
+ *Stefan Wrobel*
307
340
 
308
- # => favicon_link_tag 'myicon.ico'
309
- <link href="/assets/myicon.ico" rel="shortcut icon" type="image/x-icon" />
341
+ * `OptimizedFileSystemResolver` prefers template details in order of locale,
342
+ formats, variants, handlers.
310
343
 
311
- *Geoffroy Lorieux*
344
+ *Iago Pimenta*
312
345
 
313
- * Remove wrapping div with inline styles for hidden form fields.
346
+ * Added `class_names` helper to create a CSS class value with conditional classes.
314
347
 
315
- We are dropping HTML 4.01 and XHTML strict compliance since input tags directly
316
- inside a form are valid HTML5, and the absence of inline styles help in validating
317
- for Content Security Policy.
348
+ *Joel Hawksley*, *Aaron Patterson*
318
349
 
319
- *Joost Baaij*
350
+ * Add support for conditional values to TagBuilder.
320
351
 
321
- * `collection_check_boxes` respects `:index` option for the hidden field name.
352
+ *Joel Hawksley*
322
353
 
323
- Fixes #14147.
354
+ * `ActionView::Helpers::FormOptionsHelper#select` should mark option for `nil` as selected.
324
355
 
325
- *Vasiliy Ermolovich*
356
+ ```ruby
357
+ @post = Post.new
358
+ @post.category = nil
359
+
360
+ # Before
361
+ select("post", "category", none: nil, programming: 1, economics: 2)
362
+ # =>
363
+ # <select name="post[category]" id="post_category">
364
+ # <option value="">none</option>
365
+ # <option value="1">programming</option>
366
+ # <option value="2">economics</option>
367
+ # </select>
368
+
369
+ # After
370
+ select("post", "category", none: nil, programming: 1, economics: 2)
371
+ # =>
372
+ # <select name="post[category]" id="post_category">
373
+ # <option selected="selected" value="">none</option>
374
+ # <option value="1">programming</option>
375
+ # <option value="2">economics</option>
376
+ # </select>
377
+ ```
378
+
379
+ *bogdanvlviv*
380
+
381
+ * Log lines for partial renders and started template renders are now
382
+ emitted at the `DEBUG` level instead of `INFO`.
383
+
384
+ Completed template renders are still logged at the `INFO` level.
385
+
386
+ *DHH*
326
387
 
327
- * `date_select` helper with option `with_css_classes: true` does not overwrite other classes.
388
+ * ActionView::Helpers::SanitizeHelper: support rails-html-sanitizer 1.1.0.
328
389
 
329
- *Izumi Wong-Horiuchi*
390
+ *Juanito Fatas*
330
391
 
331
- * `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
332
- as input.
392
+ * Added `phone_to` helper method to create a link from mobile numbers.
333
393
 
334
- Fixes #14405.
394
+ *Pietro Moro*
335
395
 
336
- *Yves Senn*
396
+ * annotated_source_code returns an empty array so TemplateErrors without a
397
+ template in the backtrace are surfaced properly by DebugExceptions.
337
398
 
338
- * Add `include_hidden` option to `collection_check_boxes` helper.
399
+ *Guilherme Mansur*, *Kasper Timm Hansen*
339
400
 
340
- *Vasiliy Ermolovich*
401
+ * Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
341
402
 
342
- * Fixed a problem where the default options for the `button_tag` helper are not
343
- applied correctly.
403
+ *Guilherme Mansur*, *Gannon McGibbon*
344
404
 
345
- Fixes #14254.
405
+ * `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`.
346
406
 
347
- *Sergey Prikhodko*
407
+ *Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
348
408
 
349
- * Take variants into account when calculating template digests in ActionView::Digestor.
409
+ * Fix `select_tag` so that it doesn't change `options` when `include_blank` is present.
350
410
 
351
- The arguments to ActionView::Digestor#digest are now being passed as a hash
352
- to support variants and allow more flexibility in the future. The support for
353
- regular (required) arguments is deprecated and will be removed in Rails 5.0 or later.
411
+ *Younes SERRAJ*
354
412
 
355
- *Piotr Chmolowski, Łukasz Strzałkowski*
356
413
 
357
- Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionview/CHANGELOG.md) for previous changes.
414
+ 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-2014 David Heinemeier Hansson
1
+ Copyright (c) 2004-2022 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
@@ -18,4 +18,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-