actionview 4.2.11 → 5.0.7

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 (68) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +304 -184
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +2 -3
  5. data/lib/action_view.rb +1 -1
  6. data/lib/action_view/base.rb +14 -2
  7. data/lib/action_view/dependency_tracker.rb +51 -18
  8. data/lib/action_view/digestor.rb +83 -81
  9. data/lib/action_view/flows.rb +4 -5
  10. data/lib/action_view/gem_version.rb +3 -3
  11. data/lib/action_view/helpers/asset_tag_helper.rb +15 -5
  12. data/lib/action_view/helpers/asset_url_helper.rb +51 -12
  13. data/lib/action_view/helpers/atom_feed_helper.rb +6 -5
  14. data/lib/action_view/helpers/cache_helper.rb +62 -21
  15. data/lib/action_view/helpers/capture_helper.rb +5 -4
  16. data/lib/action_view/helpers/controller_helper.rb +11 -2
  17. data/lib/action_view/helpers/date_helper.rb +59 -13
  18. data/lib/action_view/helpers/debug_helper.rb +1 -1
  19. data/lib/action_view/helpers/form_helper.rb +74 -72
  20. data/lib/action_view/helpers/form_options_helper.rb +79 -39
  21. data/lib/action_view/helpers/form_tag_helper.rb +74 -44
  22. data/lib/action_view/helpers/javascript_helper.rb +4 -4
  23. data/lib/action_view/helpers/number_helper.rb +28 -13
  24. data/lib/action_view/helpers/output_safety_helper.rb +32 -2
  25. data/lib/action_view/helpers/record_tag_helper.rb +12 -99
  26. data/lib/action_view/helpers/rendering_helper.rb +2 -2
  27. data/lib/action_view/helpers/sanitize_helper.rb +1 -2
  28. data/lib/action_view/helpers/tag_helper.rb +19 -11
  29. data/lib/action_view/helpers/tags/base.rb +45 -29
  30. data/lib/action_view/helpers/tags/collection_check_boxes.rb +4 -28
  31. data/lib/action_view/helpers/tags/collection_helpers.rb +32 -0
  32. data/lib/action_view/helpers/tags/collection_radio_buttons.rb +1 -9
  33. data/lib/action_view/helpers/tags/datetime_field.rb +1 -1
  34. data/lib/action_view/helpers/tags/label.rb +1 -1
  35. data/lib/action_view/helpers/tags/placeholderable.rb +1 -1
  36. data/lib/action_view/helpers/tags/search_field.rb +12 -9
  37. data/lib/action_view/helpers/tags/text_field.rb +0 -1
  38. data/lib/action_view/helpers/tags/translator.rb +1 -1
  39. data/lib/action_view/helpers/text_helper.rb +27 -11
  40. data/lib/action_view/helpers/translation_helper.rb +56 -26
  41. data/lib/action_view/helpers/url_helper.rb +108 -79
  42. data/lib/action_view/layouts.rb +11 -10
  43. data/lib/action_view/log_subscriber.rb +35 -1
  44. data/lib/action_view/lookup_context.rb +69 -48
  45. data/lib/action_view/model_naming.rb +1 -1
  46. data/lib/action_view/path_set.rb +9 -0
  47. data/lib/action_view/railtie.rb +18 -3
  48. data/lib/action_view/record_identifier.rb +45 -19
  49. data/lib/action_view/renderer/abstract_renderer.rb +7 -3
  50. data/lib/action_view/renderer/partial_renderer.rb +38 -37
  51. data/lib/action_view/renderer/partial_renderer/collection_caching.rb +49 -0
  52. data/lib/action_view/renderer/renderer.rb +2 -6
  53. data/lib/action_view/renderer/streaming_template_renderer.rb +1 -1
  54. data/lib/action_view/renderer/template_renderer.rb +11 -10
  55. data/lib/action_view/rendering.rb +15 -7
  56. data/lib/action_view/routing_url_for.rb +18 -6
  57. data/lib/action_view/tasks/{dependencies.rake → cache_digests.rake} +2 -2
  58. data/lib/action_view/template.rb +36 -12
  59. data/lib/action_view/template/error.rb +20 -9
  60. data/lib/action_view/template/handlers.rb +6 -4
  61. data/lib/action_view/template/handlers/html.rb +9 -0
  62. data/lib/action_view/template/handlers/raw.rb +1 -3
  63. data/lib/action_view/template/resolver.rb +49 -42
  64. data/lib/action_view/template/types.rb +14 -16
  65. data/lib/action_view/test_case.rb +15 -9
  66. data/lib/action_view/testing/resolvers.rb +1 -2
  67. data/lib/action_view/view_paths.rb +6 -24
  68. metadata +16 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 5e7b9221736adda58106debc5d54f6f07d083b3112eb52b9c540c1291ae91fc8
4
- data.tar.gz: f701a8eef7ab52e6a32bf694c9dfb02c8b651214719c9ab8547883603783d9f3
2
+ SHA1:
3
+ metadata.gz: 504d7473689ed8f38cc1fce3ef610f399ecbd80d
4
+ data.tar.gz: a6b63c2be57261f253e8a3de82945cfa5997ee9f
5
5
  SHA512:
6
- metadata.gz: eea32490b49c7a165f1b90020c50f9b68df85b2174529ac5554ee3675726188b3ed62cbe65de3817257f02b958b8738ff1384a66e1a5f8284bd180fe540c5339
7
- data.tar.gz: ec478c66bc6afcb64913810e972006c373df4f3c532cd331553e4ff9a98678d4aa0d1eea48950f91fade546a44b447a73e963b26bbb6a4a47d6084c5823dd39e
6
+ metadata.gz: 2aeb281711c5210f6666345c22b30b39094fec33b21346cb24a37b43ec4a839f6aa60c14494cf5c0015ca6e57a6c30c7671ccb670de140d4624fe9726956f92b
7
+ data.tar.gz: 62704f8d57a843d2fc2344096edb2f4f3b276e8f15536e43f36354f579b760bb67bce645b6c28e5117bc26dc31164a8f40511b6797787c40cd92d671750b2f7e
data/CHANGELOG.md CHANGED
@@ -1,352 +1,472 @@
1
- ## Rails 4.2.11 (November 27, 2018) ##
1
+ ## Rails 5.0.7 (March 29, 2018) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 4.2.10 (September 27, 2017) ##
6
+ ## Rails 5.0.6 (September 07, 2017) ##
7
7
 
8
8
  * No changes.
9
9
 
10
10
 
11
- ## Rails 4.2.9 (June 26, 2017) ##
11
+ ## Rails 5.0.6.rc1 (August 24, 2017) ##
12
12
 
13
13
  * No changes.
14
14
 
15
15
 
16
- ## Rails 4.2.8 (February 21, 2017) ##
16
+ ## Rails 5.0.5 (July 31, 2017) ##
17
17
 
18
18
  * No changes.
19
19
 
20
20
 
21
- ## Rails 4.2.7 (July 12, 2016) ##
21
+ ## Rails 5.0.5.rc2 (July 25, 2017) ##
22
22
 
23
23
  * No changes.
24
24
 
25
25
 
26
- ## Rails 4.2.6 (March 07, 2016) ##
26
+ ## Rails 5.0.5.rc1 (July 19, 2017) ##
27
27
 
28
- * Fix stripping the digest from the automatically generated img tag alt
29
- attribute when assets are handled by Sprockets >=3.0.
28
+ * No changes.
30
29
 
31
- *Bart de Water*
32
30
 
33
- * Create a new `ActiveSupport::SafeBuffer` instance when `content_for` is flushed.
31
+ ## Rails 5.0.4 (June 19, 2017) ##
34
32
 
35
- Fixes #19890
33
+ * No changes.
36
34
 
37
- *Yoong Kang Lim*
38
35
 
39
- * Respect value of `:object` if `:object` is false when rendering.
36
+ ## Rails 5.0.3 (May 12, 2017) ##
40
37
 
41
- Fixes #22260.
38
+ * No changes.
42
39
 
43
- *Yuichiro Kaneko*
44
40
 
45
- * Generate `week_field` input values using a 1-based index and not a 0-based index
46
- as per the W3 spec: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
41
+ ## Rails 5.0.2 (March 01, 2017) ##
47
42
 
48
- *Christoph Geschwind*
43
+ * Allow render locals to be assigned to instance variables in a view.
49
44
 
45
+ Fixes #27480.
50
46
 
51
- ## Rails 4.2.5.2 (February 26, 2016) ##
47
+ *Andrew White*
52
48
 
53
- * Do not allow render with unpermitted parameter.
49
+ * Return correct object name in form helper method after `fields_for`.
54
50
 
55
- Fixes CVE-2016-2098.
51
+ Fixes #26931.
56
52
 
57
- *Arthur Neves*
53
+ *Yuji Yaginuma*
58
54
 
59
55
 
60
- ## Rails 4.2.5.1 (January 25, 2015) ##
56
+ ## Rails 5.0.1 (December 21, 2016) ##
61
57
 
62
- * Adds boolean argument outside_app_allowed to `ActionView::Resolver#find_templates`
63
- method.
58
+ * No changes.
64
59
 
65
- *Aaron Patterson*
66
60
 
61
+ ## Rails 5.0.1.rc2 (December 10, 2016) ##
67
62
 
68
- ## Rails 4.2.5 (November 12, 2015) ##
63
+ * Restore support for locals named `_`, `arg`, `args`, and `block`.
69
64
 
70
- * Fix `mail_to` when called with `nil` as argument.
65
+ Fixes #27302.
71
66
 
72
- *Rafael Mendonça França*
67
+ *Toshimaru*
73
68
 
74
- * `url_for` does not modify its arguments when generating polymorphic URLs.
75
69
 
76
- *Bernerd Schaefer*
70
+ ## Rails 5.0.1.rc1 (December 01, 2016) ##
77
71
 
72
+ * Fix support to `ActionController::Parameters` in `button_to`.
78
73
 
79
- ## Rails 4.2.4 (August 24, 2015) ##
74
+ *Jon Moss*
80
75
 
81
- * No Changes *
76
+ * Render now accepts any keys for locals, including reserved words
82
77
 
78
+ Only locals with valid variable names get set directly. Others
79
+ will still be available in local_assigns.
83
80
 
84
- ## Rails 4.2.3 (June 25, 2015) ##
81
+ Example of render with reserved words:
85
82
 
86
- * `translate` should handle `raise` flag correctly in case of both main and default
87
- translation is missing.
83
+ ```erb
84
+ <%= render "example", class: "text-center", message: "Hello world!" %>
88
85
 
89
- Fixes #19967
86
+ <!-- _example.html.erb: -->
87
+ <%= tag.div class: local_assigns[:class] do %>
88
+ <p><%= message %></p>
89
+ <% end %>
90
+ ```
90
91
 
91
- *Bernard Potocki*
92
+ *Peter Schilling*, *Matthew Draper*
92
93
 
93
- * `translate` allows `default: [[]]` again for a default value of `[]`.
94
+ * Changed partial rendering with a collection to allow collections which
95
+ implement `to_a`.
94
96
 
95
- Fixes #19640.
97
+ Extracting the collection option had an optimization to avoid unnecessary
98
+ queries of ActiveRecord Relations by calling `#to_ary` on the given
99
+ collection. Instances of `Enumerator` or `Enumerable` are valid
100
+ collections, but they do not implement `#to_ary`. By changing this to
101
+ `#to_a`, they will now be extracted and rendered as expected.
96
102
 
97
- *Adam Prescott*
103
+ *Steven Harman*
98
104
 
99
- * `translate` should accept nils as members of the `:default`
100
- parameter without raising a translation missing error. Fixes a
101
- regression introduced 362557e.
105
+ * Fix `ActionView::Helpers#current_page?` to work properly even with
106
+ a trailing slash.
102
107
 
103
- Fixes #19419
108
+ Fixes #19472.
104
109
 
105
- *Justin Coyne*
110
+ *Stan Lo*
106
111
 
107
- * `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
108
- as input when `precision: 0` is used.
109
112
 
110
- Fixes #19227.
113
+ ## Rails 5.0.0 (June 30, 2016) ##
111
114
 
112
- *Yves Senn*
115
+ * Changed partial rendering with a collection to allow collections which
116
+ implement `to_a`.
113
117
 
118
+ Extracting the collection option had an optimization to avoid unnecessary
119
+ queries of ActiveRecord Relations by calling `#to_ary` on the given
120
+ collection. Instances of `Enumerator` or `Enumerable` are valid
121
+ collections, but they do not implement `#to_ary`. By changing this to
122
+ `#to_a`, they will now be extracted and rendered as expected.
114
123
 
115
- ## Rails 4.2.2 (June 16, 2015) ##
124
+ *Steven Harman*
116
125
 
117
- * No Changes *
126
+ * Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` fields.
118
127
 
128
+ As a new specification of the HTML 5 the text field type `datetime` will no longer exist
129
+ and it is recomended to use `datetime-local`.
130
+ Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
119
131
 
120
- ## Rails 4.2.1 (March 19, 2015) ##
132
+ *Herminio Torres*
121
133
 
122
- * Default translations that have a lower precedence than an html safe default,
123
- but are not themselves safe, should not be marked as html_safe.
134
+ * Raw template handler (which is also the default template handler in Rails 5) now outputs
135
+ HTML-safe strings.
124
136
 
125
- *Justin Coyne*
137
+ In Rails 5 the default template handler was changed to the raw template handler. Because
138
+ the ERB template handler escaped strings by default this broke some applications that
139
+ expected plain JS or HTML files to be rendered unescaped. This fixes the issue caused
140
+ by changing the default handler by changing the Raw template handler to output HTML-safe
141
+ strings.
126
142
 
127
- * Added an explicit error message, in `ActionView::PartialRenderer`
128
- for partial `rendering`, when the value of option `as` has invalid characters.
143
+ *Eileen M. Uchitelle*
129
144
 
130
- *Angelo Capilleri*
145
+ * `select_tag`'s `include_blank` option for generation for blank option tag, now adds an empty space label,
146
+ when the value as well as content for option tag are empty, so that we confirm with html specification.
147
+ Ref: https://www.w3.org/TR/html5/forms.html#the-option-element.
131
148
 
149
+ Generation of option before:
132
150
 
133
- ## Rails 4.2.0 (December 20, 2014) ##
151
+ ```html
152
+ <option value=""></option>
153
+ ```
134
154
 
135
- * Local variable in a partial is now available even if a falsy value is
136
- passed to `:object` when rendering a partial.
155
+ Generation of option after:
137
156
 
138
- Fixes #17373.
157
+ ```html
158
+ <option value="" label=" "></option>
159
+ ```
139
160
 
140
- *Agis Anastasopoulos*
161
+ *Vipul A M *
141
162
 
142
- * Add support for `:enforce_utf8` option in `form_for`.
163
+ * `date_select` helper `:with_css_classes` option now accepts a hash of strings
164
+ for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend
165
+ the select type with the given css class value.
143
166
 
144
- This is the same option that was added in 06388b0 to `form_tag` and allows
145
- users to skip the insertion of the UTF8 enforcer tag in a form.
167
+ ```erb
168
+ <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %>
169
+ ```
146
170
 
147
- * claudiob *
171
+ ```html
172
+ <select id="user_birthday_3i" name="user[birthday(3i)]">…</select>
173
+ <select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select>
174
+ <select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select>
175
+ ```
148
176
 
149
- * Fix a bug that <%= foo(){ %> and <%= foo()do %> in view templates were not regarded
150
- as Ruby block calls.
177
+ *Matthias Neumayr*
151
178
 
152
- * Akira Matsuda *
179
+ * Add `to_sentence` helper that is a HTML-safe aware version of `Array#to_sentence`.
153
180
 
154
- * Update `select_tag` to work correctly with `:include_blank` option passing a string.
181
+ *Neil Matatall*
155
182
 
156
- Fixes #16483.
183
+ * Added log "Rendering ...", when starting to render a template to log that
184
+ we have started rendering something. This helps to easily identify the origin
185
+ of queries in the log whether they came from controller or views.
157
186
 
158
- *Frank Groeneveld*
187
+ *Vipul A M and Prem Sichanugrist*
159
188
 
160
- * Changed the meaning of `render "foo/bar"`.
189
+ * Collection rendering can cache and fetch multiple partials at once.
161
190
 
162
- Previously, calling `render "foo/bar"` in a controller action is equivalent
163
- to `render file: "foo/bar"`. In Rails 4.2, this has been changed to mean
164
- `render template: "foo/bar"` instead. If you need to render a file, please
165
- change your code to use the explicit form (`render file: "foo/bar"`) instead.
191
+ Collections rendered as:
166
192
 
167
- *Jeremy Jackson*
193
+ ```ruby
194
+ <%= render partial: 'notifications/notification', collection: @notifications, as: :notification, cached: true %>
195
+ ```
168
196
 
169
- * Add support for ARIA attributes in tags.
197
+ will read several partials from cache at once. The templates in the collection
198
+ that haven't been cached already will automatically be written to cache. Works
199
+ great alongside individual template fragment caching. For instance if the
200
+ template the collection renders is cached like:
170
201
 
171
- Example:
202
+ ```ruby
203
+ # notifications/_notification.html.erb
204
+ <% cache notification do %>
205
+ <%# ... %>
206
+ <% end %>
207
+ ```
172
208
 
173
- <%= f.text_field :name, aria: { required: "true", hidden: "false" } %>
209
+ Then any collection renders shares that cache when attempting to read multiple
210
+ ones at once.
174
211
 
175
- now generates:
212
+ *Kasper Timm Hansen*
176
213
 
177
- <input aria-hidden="false" aria-required="true" id="user_name" name="user[name]" type="text">
214
+ * Add support for nested hashes/arrays to `:params` option of `button_to` helper.
178
215
 
179
- *Paola Garcia Casadiego*
216
+ *James Coleman*
180
217
 
181
- * Provide a `builder` object when using the `label` form helper in block form.
218
+ * Fix stripping the digest from the automatically generated img tag alt
219
+ attribute when assets are handled by Sprockets >=3.0.
182
220
 
183
- The new `builder` object responds to `translation`, allowing I18n fallback support
184
- when you want to customize how a particular label is presented.
221
+ *Bart de Water*
185
222
 
186
- *Alex Robbin*
223
+ * Create a new `ActiveSupport::SafeBuffer` instance when `content_for` is flushed.
187
224
 
188
- * Add I18n support for input/textarea placeholder text.
225
+ Fixes #19890.
189
226
 
190
- Placeholder I18n follows the same convention as `label` I18n.
227
+ *Yoong Kang Lim*
191
228
 
192
- *Alex Robbin*
229
+ * Fix `collection_radio_buttons` hidden_field name and make it appear
230
+ before the actual input radio tags to make the real value override
231
+ the hidden when passed.
193
232
 
194
- * Fix that render layout: 'messages/layout' should also be added to the dependency tracker tree.
233
+ Fixes #22773.
195
234
 
196
- *DHH*
235
+ *Santiago Pastorino*
197
236
 
198
- * Add `PartialIteration` object used when rendering collections.
237
+ * `ActionView::TestCase::Controller#params` returns an instance of
238
+ `ActionController::Parameters`.
199
239
 
200
- The iteration object is available as the local variable
201
- `#{template_name}_iteration` when rendering partials with collections.
240
+ *Justin Coyne*
202
241
 
203
- It gives access to the `size` of the collection being iterated over,
204
- the current `index` and two convenience methods `first?` and `last?`.
242
+ * Fix regression in `submit_tag` when a symbol is used as label argument.
205
243
 
206
- *Joel Junström*, *Lucas Uyezu*
244
+ *Yuuji Yaginuma*
207
245
 
208
- * Return an absolute instead of relative path from an asset url in the case
209
- of the `asset_host` proc returning nil.
246
+ * `I18n.translate` helper will wrap the missing translation keys
247
+ in a <span> tag only if `debug_missing_translation` configuration
248
+ be true. Default value is `true`. For example in `application.rb`:
210
249
 
211
- *Jolyon Pawlyn*
250
+ # in order to turn off missing key wrapping
251
+ config.action_view.debug_missing_translation = false
212
252
 
213
- * Fix `html_escape_once` to properly handle hex escape sequences (e.g. &#x1a2b;).
253
+ *Sameer Rahmani*
214
254
 
215
- *John F. Douthat*
255
+ * Respect value of `:object` if `:object` is false when rendering.
216
256
 
217
- * Added String support for min and max properties for date field helpers.
257
+ Fixes #22260.
218
258
 
219
- *Todd Bealmear*
259
+ *Yuichiro Kaneko*
220
260
 
221
- * The `highlight` helper now accepts a block to be used instead of the `highlighter`
222
- option.
261
+ * Generate `week_field` input values using a 1-based index and not a 0-based index
262
+ as per the W3 spec: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week
223
263
 
224
- *Lucas Mazza*
264
+ *Christoph Geschwind*
225
265
 
226
- * The `except` and `highlight` helpers now accept regular expressions.
266
+ * Allow `host` option in `javascript_include_tag` and `stylesheet_link_tag` helpers
227
267
 
228
- *Jan Szumiec*
268
+ *Grzegorz Witek*
229
269
 
230
- * Flatten the array parameter in `safe_join`, so it behaves consistently with
231
- `Array#join`.
270
+ * Restrict `url_for :back` to valid, non-JavaScript URLs. GH#14444
232
271
 
233
- *Paul Grayson*
272
+ *Damien Burke*
234
273
 
235
- * Honor `html_safe` on array elements in tag values, as we do for plain string
236
- values.
274
+ * Allow `date_select` helper selected option to accept hash like the default options.
237
275
 
238
- *Paul Grayson*
276
+ *Lecky Lao*
239
277
 
240
- * Add `ActionView::Template::Handler.unregister_template_handler`.
278
+ * Collection input propagates input's `id` to the label's `for` attribute when
279
+ using html options as the last element of collection.
241
280
 
242
- It performs the opposite of `ActionView::Template::Handler.register_template_handler`.
281
+ *Vasiliy Ermolovich*
243
282
 
244
- *Zuhao Wan*
283
+ * Add a `hidden_field` on the `collection_radio_buttons` to avoid raising an error
284
+ when the only input on the form is the `collection_radio_buttons`.
245
285
 
246
- * Bring `cache_digest` rake tasks up-to-date with the latest API changes.
286
+ *Mauro George*
247
287
 
248
- *Jiri Pospisil*
288
+ * `url_for` does not modify its arguments when generating polymorphic URLs.
249
289
 
250
- * Allow custom `:host` option to be passed to `asset_url` helper that
251
- overwrites `config.action_controller.asset_host` for particular asset.
290
+ *Bernerd Schaefer*
252
291
 
253
- *Hubert Łępicki*
292
+ * `number_to_currency` and `number_with_delimiter` now accept a custom `delimiter_pattern` option
293
+ to handle placement of delimiter, to support currency formats like INR.
254
294
 
255
- * Deprecate `AbstractController::Base.parent_prefixes`.
256
- Override `AbstractController::Base.local_prefixes` when you want to change
257
- where to find views.
295
+ Example:
258
296
 
259
- *Nick Sutterer*
297
+ number_to_currency(1230000, delimiter_pattern: /(\d+?)(?=(\d\d)+(\d)(?!\d))/, unit: '₹', format: "%u %n")
298
+ # => '₹ 12,30,000.00'
260
299
 
261
- * Take label values into account when doing I18n lookups for model attributes.
300
+ *Vipul A M*
262
301
 
263
- The following:
302
+ * Make `disable_with` the default behavior for submit tags. Disables the
303
+ button on submit to prevent double submits.
264
304
 
265
- # form.html.erb
266
- <%= form_for @post do |f| %>
267
- <%= f.label :type, value: "long" %>
268
- <% end %>
305
+ *Justin Schiff*
269
306
 
270
- # en.yml
271
- en:
272
- activerecord:
273
- attributes:
274
- post/long: "Long-form Post"
307
+ * Add a break_sequence option to word_wrap so you can specify a custom break.
275
308
 
276
- Used to simply return "long", but now it will return "Long-form
277
- Post".
309
+ *Mauricio Gomez*
278
310
 
279
- *Joshua Cody*
311
+ * Add wildcard matching to explicit dependencies.
280
312
 
281
- * Change `asset_path` to use File.join to create proper paths:
313
+ Turns:
282
314
 
283
- Before:
315
+ ```erb
316
+ <% # Template Dependency: recordings/threads/events/subscribers_changed %>
317
+ <% # Template Dependency: recordings/threads/events/completed %>
318
+ <% # Template Dependency: recordings/threads/events/uncompleted %>
319
+ ```
284
320
 
285
- https://some.host.com//assets/some.js
321
+ Into:
286
322
 
287
- After:
323
+ ```erb
324
+ <% # Template Dependency: recordings/threads/events/* %>
325
+ ```
288
326
 
289
- https://some.host.com/assets/some.js
327
+ *Kasper Timm Hansen*
290
328
 
291
- *Peter Schröder*
329
+ * Allow defining explicit collection caching using a `# Template Collection: ...`
330
+ directive inside templates.
292
331
 
293
- * Change `favicon_link_tag` default mimetype from `image/vnd.microsoft.icon` to
294
- `image/x-icon`.
332
+ *Dov Murik*
295
333
 
296
- Before:
334
+ * Asset helpers raise `ArgumentError` when `nil` is passed as a source.
297
335
 
298
- # => favicon_link_tag 'myicon.ico'
299
- <link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
336
+ *Anton Kolomiychuk*
300
337
 
301
- After:
338
+ * Always attach the template digest to the cache key for collection caching
339
+ even when `virtual_path` is not available from the view context.
340
+ Which could happen if the rendering was done directly in the controller
341
+ and not in a template.
302
342
 
303
- # => favicon_link_tag 'myicon.ico'
304
- <link href="/assets/myicon.ico" rel="shortcut icon" type="image/x-icon" />
343
+ Fixes #20535.
305
344
 
306
- *Geoffroy Lorieux*
345
+ *Roque Pinel*
307
346
 
308
- * Remove wrapping div with inline styles for hidden form fields.
347
+ * Improve detection of partial templates eligible for collection caching,
348
+ now allowing multi-line comments at the beginning of the template file.
309
349
 
310
- We are dropping HTML 4.01 and XHTML strict compliance since input tags directly
311
- inside a form are valid HTML5, and the absence of inline styles help in validating
312
- for Content Security Policy.
350
+ *Dov Murik*
313
351
 
314
- *Joost Baaij*
352
+ * Raise an `ArgumentError` when a false value for `include_blank` is passed to a
353
+ required select field (to comply with the HTML5 spec).
315
354
 
316
- * `collection_check_boxes` respects `:index` option for the hidden field name.
355
+ *Grey Baker*
317
356
 
318
- Fixes #14147.
357
+ * Do not put partial name to `local_assigns` when rendering without
358
+ an object or a collection.
319
359
 
320
- *Vasiliy Ermolovich*
360
+ *Henrik Nygren*
321
361
 
322
- * `date_select` helper with option `with_css_classes: true` does not overwrite other classes.
362
+ * Remove `:rescue_format` option for `translate` helper since it's no longer
363
+ supported by I18n.
323
364
 
324
- *Izumi Wong-Horiuchi*
365
+ *Bernard Potocki*
366
+
367
+ * `translate` should handle `raise` flag correctly in case of both main and default
368
+ translation is missing.
369
+
370
+ Fixes #19967.
371
+
372
+ *Bernard Potocki*
373
+
374
+ * Load the `default_form_builder` from the controller on initialization, which overrides
375
+ the global config if it is present.
376
+
377
+ *Kevin McPhillips*
378
+
379
+ * Accept lambda as `child_index` option in `fields_for` method.
380
+
381
+ *Karol Galanciak*
382
+
383
+ * `translate` allows `default: [[]]` again for a default value of `[]`.
384
+
385
+ Fixes #19640.
386
+
387
+ *Adam Prescott*
388
+
389
+ * `translate` should accept nils as members of the `:default`
390
+ parameter without raising a translation missing error.
391
+
392
+ Fixes #19419.
393
+
394
+ *Justin Coyne*
325
395
 
326
396
  * `number_to_percentage` does not crash with `Float::NAN` or `Float::INFINITY`
327
- as input.
397
+ as input when `precision: 0` is used.
328
398
 
329
- Fixes #14405.
399
+ Fixes #19227.
330
400
 
331
401
  *Yves Senn*
332
402
 
333
- * Add `include_hidden` option to `collection_check_boxes` helper.
403
+ * Fixed the translation helper method to accept different default values types
404
+ besides String.
334
405
 
335
- *Vasiliy Ermolovich*
406
+ *Ulisses Almeida*
407
+
408
+ * Fixed a dependency tracker bug that caused template dependencies not
409
+ count layouts as dependencies for partials.
336
410
 
337
- * Fixed a problem where the default options for the `button_tag` helper are not
338
- applied correctly.
411
+ *Juho Leinonen*
339
412
 
340
- Fixes #14254.
413
+ * Extracted `ActionView::Helpers::RecordTagHelper` to external gem
414
+ (`record_tag_helper`) and added removal notices.
341
415
 
342
- *Sergey Prikhodko*
416
+ *Todd Bealmear*
417
+
418
+ * Allow to pass an integer value to `size` option in `image_tag` and `video_tag`.
419
+
420
+ This makes the behavior more consistent with `width` or `height` options.
421
+
422
+ *Mehdi Lahmam*
423
+
424
+ * Partial template name does no more have to be a valid Ruby identifier.
425
+
426
+ There used to be a naming rule that the partial name should start with
427
+ underscore, and should be followed by any combination of letters, numbers
428
+ and underscores.
429
+ But now we can give our partials any name starting with underscore, such as
430
+ _🍔.html.erb.
431
+
432
+ *Akira Matsuda*
433
+
434
+ * Change the default template handler from `ERB` to `Raw`.
435
+
436
+ Files without a template handler in their extension will be rendered using the raw
437
+ handler instead of ERB.
438
+
439
+ *Rafael Mendonça França*
440
+
441
+ * Remove deprecated `AbstractController::Base::parent_prefixes`.
442
+
443
+ *Rafael Mendonça França*
444
+
445
+ * Default translations that have a lower precedence than a html safe default,
446
+ but are not themselves safe, should not be marked as html_safe.
447
+
448
+ *Justin Coyne*
449
+
450
+ * Make possible to use blocks with short version of `render "partial"` helper.
451
+
452
+ *Nikolay Shebanov*
343
453
 
344
- * Take variants into account when calculating template digests in ActionView::Digestor.
454
+ * Add a `hidden_field` on the `file_field` to avoid raising an error when the only
455
+ input on the form is the `file_field`.
456
+
457
+ *Mauro George*
458
+
459
+ * Add support for Reply-To field in `mail_to` helper.
460
+
461
+ *Mark Dodwell*
462
+
463
+ * Add an explicit error message, in `ActionView::PartialRenderer` for partial
464
+ `rendering`, when the value of option `as` has invalid characters.
465
+
466
+ *Angelo Capilleri*
345
467
 
346
- The arguments to ActionView::Digestor#digest are now being passed as a hash
347
- to support variants and allow more flexibility in the future. The support for
348
- regular (required) arguments is deprecated and will be removed in Rails 5.0 or later.
468
+ * Allow entries without a link tag in `AtomFeedHelper`.
349
469
 
350
- *Piotr Chmolowski, Łukasz Strzałkowski*
470
+ *Daniel Gomez de Souza*
351
471
 
352
- Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionview/CHANGELOG.md) for previous changes.
472
+ Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionview/CHANGELOG.md) for previous changes.