actionview 4.2.11.1 → 6.1.5

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