actionview 7.0.5 → 7.0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +80 -0
- data/README.rdoc +2 -2
- data/lib/action_view/gem_version.rb +2 -2
- data/lib/action_view/helpers/form_helper.rb +4 -3
- data/lib/action_view/renderer/partial_renderer/collection_caching.rb +20 -3
- data/lib/action_view/ripper_ast_parser.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbf8032007fb7b2acf39358fda63a7bb6c9fb14cc0fdb9c566230ab0b6b04c4a
|
|
4
|
+
data.tar.gz: 8b32c841e532b2f8112311673d6cfad2f729917a2f394236187b4f437316b47c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7cf741e2af1ee69051ecebcd8a72dbe54cd2df9ccca4ac3f49d069db5174d501f296ae9a5fbcbf319a8a1a74eff19c1a4cd2caa8fb3dc12e203ec6a9b55bd71
|
|
7
|
+
data.tar.gz: 6a0ea6598a57d7f0793c08af861fcb1b6a6d8fc36866f82e1e0b2583a2d8d901bd204046daf4f12cae567a9e88aa9edd56ebcb93429226f29c43432b92d80b9c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,83 @@
|
|
|
1
|
+
## Rails 7.0.8.6 (October 23, 2024) ##
|
|
2
|
+
|
|
3
|
+
* No changes.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Rails 7.0.8.5 (October 15, 2024) ##
|
|
7
|
+
|
|
8
|
+
* No changes.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Rails 7.0.8.4 (June 04, 2024) ##
|
|
12
|
+
|
|
13
|
+
* No changes.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Rails 7.0.8.3 (May 17, 2024) ##
|
|
17
|
+
|
|
18
|
+
* No changes.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Rails 7.0.8.2 (May 16, 2024) ##
|
|
22
|
+
|
|
23
|
+
* No changes.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Rails 7.0.8.1 (February 21, 2024) ##
|
|
27
|
+
|
|
28
|
+
* No changes.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Rails 7.0.8 (September 09, 2023) ##
|
|
32
|
+
|
|
33
|
+
* Fix `form_for` missing the hidden `_method` input for models with a
|
|
34
|
+
namespaced route.
|
|
35
|
+
|
|
36
|
+
*Hartley McGuire*
|
|
37
|
+
|
|
38
|
+
* Fix `render collection: @records, cache: true` inside `jbuilder` templates
|
|
39
|
+
|
|
40
|
+
The previous fix that shipped in `7.0.7` assumed template fragments are always strings,
|
|
41
|
+
this isn't true with `jbuilder`.
|
|
42
|
+
|
|
43
|
+
*Jean Boussier*
|
|
44
|
+
|
|
45
|
+
## Rails 7.0.7.2 (August 22, 2023) ##
|
|
46
|
+
|
|
47
|
+
* No changes.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Rails 7.0.7.1 (August 22, 2023) ##
|
|
51
|
+
|
|
52
|
+
* No changes.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## Rails 7.0.7 (August 09, 2023) ##
|
|
56
|
+
|
|
57
|
+
* Fix `render collection: @records, cache: true` to cache fragments as bare strings
|
|
58
|
+
|
|
59
|
+
Previously it would incorrectly cache them as Action View buffers.
|
|
60
|
+
|
|
61
|
+
*Jean Boussier*
|
|
62
|
+
|
|
63
|
+
* Don't double-encode nested `field_id` and `field_name` index values
|
|
64
|
+
|
|
65
|
+
Pass `index: @options` as a default keyword argument to `field_id` and
|
|
66
|
+
`field_name` view helper methods.
|
|
67
|
+
|
|
68
|
+
*Sean Doyle*
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## Rails 7.0.6 (June 29, 2023) ##
|
|
72
|
+
|
|
73
|
+
* No changes.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Rails 7.0.5.1 (June 26, 2023) ##
|
|
77
|
+
|
|
78
|
+
* No changes.
|
|
79
|
+
|
|
80
|
+
|
|
1
81
|
## Rails 7.0.5 (May 24, 2023) ##
|
|
2
82
|
|
|
3
83
|
* `FormBuilder#id` finds id set by `form_for` and `form_with`.
|
data/README.rdoc
CHANGED
|
@@ -13,7 +13,7 @@ The latest version of Action View can be installed with RubyGems:
|
|
|
13
13
|
|
|
14
14
|
$ gem install actionview
|
|
15
15
|
|
|
16
|
-
Source code can be downloaded as part of the Rails project on GitHub:
|
|
16
|
+
Source code can be downloaded as part of the \Rails project on GitHub:
|
|
17
17
|
|
|
18
18
|
* https://github.com/rails/rails/tree/main/actionview
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@ API documentation is at
|
|
|
31
31
|
|
|
32
32
|
* https://api.rubyonrails.org
|
|
33
33
|
|
|
34
|
-
Bug reports for the Ruby on Rails project can be filed here:
|
|
34
|
+
Bug reports for the Ruby on \Rails project can be filed here:
|
|
35
35
|
|
|
36
36
|
* https://github.com/rails/rails/issues
|
|
37
37
|
|
|
@@ -465,12 +465,13 @@ module ActionView
|
|
|
465
465
|
|
|
466
466
|
as = options[:as]
|
|
467
467
|
namespace = options[:namespace]
|
|
468
|
-
action = object.respond_to?(:persisted?) && object.persisted? ? :edit : :new
|
|
468
|
+
action, method = object.respond_to?(:persisted?) && object.persisted? ? [:edit, :patch] : [:new, :post]
|
|
469
469
|
options[:html] ||= {}
|
|
470
470
|
options[:html].reverse_merge!(
|
|
471
471
|
class: as ? "#{action}_#{as}" : dom_class(object, action),
|
|
472
472
|
id: (as ? [namespace, action, as] : [namespace, dom_id(object, action)]).compact.join("_").presence,
|
|
473
473
|
)
|
|
474
|
+
options[:method] ||= method
|
|
474
475
|
end
|
|
475
476
|
private :apply_form_for_options!
|
|
476
477
|
|
|
@@ -1754,7 +1755,7 @@ module ActionView
|
|
|
1754
1755
|
# <tt>aria-describedby</tt> attribute referencing the <tt><span></tt>
|
|
1755
1756
|
# element, sharing a common <tt>id</tt> root (<tt>post_title</tt>, in this
|
|
1756
1757
|
# case).
|
|
1757
|
-
def field_id(method, *suffixes, namespace: @options[:namespace], index: @index)
|
|
1758
|
+
def field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index])
|
|
1758
1759
|
@template.field_id(@object_name, method, *suffixes, namespace: namespace, index: index)
|
|
1759
1760
|
end
|
|
1760
1761
|
|
|
@@ -1774,7 +1775,7 @@ module ActionView
|
|
|
1774
1775
|
# <%# => <input type="text" name="post[tag][]">
|
|
1775
1776
|
# <% end %>
|
|
1776
1777
|
#
|
|
1777
|
-
def field_name(method, *methods, multiple: false, index: @index)
|
|
1778
|
+
def field_name(method, *methods, multiple: false, index: @options[:index])
|
|
1778
1779
|
object_name = @options.fetch(:as) { @object_name }
|
|
1779
1780
|
|
|
1780
1781
|
@template.field_name(object_name, method, *methods, index: index, multiple: multiple)
|
|
@@ -88,15 +88,32 @@ module ActionView
|
|
|
88
88
|
# If the partial is not already cached it will also be
|
|
89
89
|
# written back to the underlying cache store.
|
|
90
90
|
def fetch_or_cache_partial(cached_partials, template, order_by:)
|
|
91
|
-
|
|
91
|
+
entries_to_write = {}
|
|
92
|
+
|
|
93
|
+
keyed_partials = order_by.index_with do |cache_key|
|
|
92
94
|
if content = cached_partials[cache_key]
|
|
93
95
|
build_rendered_template(content, template)
|
|
94
96
|
else
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
rendered_partial = yield
|
|
98
|
+
body = rendered_partial.body
|
|
99
|
+
|
|
100
|
+
# We want to cache buffers as raw strings. This both improve performance and
|
|
101
|
+
# avoid creating forward compatibility issues with the internal representation
|
|
102
|
+
# of these two types.
|
|
103
|
+
if body.is_a?(ActiveSupport::SafeBuffer)
|
|
104
|
+
body = body.to_str
|
|
97
105
|
end
|
|
106
|
+
|
|
107
|
+
entries_to_write[cache_key] = body
|
|
108
|
+
rendered_partial
|
|
98
109
|
end
|
|
99
110
|
end
|
|
111
|
+
|
|
112
|
+
unless entries_to_write.empty?
|
|
113
|
+
collection_cache.write_multi(entries_to_write)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
keyed_partials
|
|
100
117
|
end
|
|
101
118
|
end
|
|
102
119
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: actionview
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.0.
|
|
4
|
+
version: 7.0.8.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 7.0.
|
|
19
|
+
version: 7.0.8.6
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 7.0.
|
|
26
|
+
version: 7.0.8.6
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: builder
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -92,28 +92,28 @@ dependencies:
|
|
|
92
92
|
requirements:
|
|
93
93
|
- - '='
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 7.0.
|
|
95
|
+
version: 7.0.8.6
|
|
96
96
|
type: :development
|
|
97
97
|
prerelease: false
|
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - '='
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 7.0.
|
|
102
|
+
version: 7.0.8.6
|
|
103
103
|
- !ruby/object:Gem::Dependency
|
|
104
104
|
name: activemodel
|
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
|
106
106
|
requirements:
|
|
107
107
|
- - '='
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 7.0.
|
|
109
|
+
version: 7.0.8.6
|
|
110
110
|
type: :development
|
|
111
111
|
prerelease: false
|
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - '='
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: 7.0.
|
|
116
|
+
version: 7.0.8.6
|
|
117
117
|
description: Simple, battle-tested conventions and helpers for building web pages.
|
|
118
118
|
email: david@loudthinking.com
|
|
119
119
|
executables: []
|
|
@@ -246,10 +246,10 @@ licenses:
|
|
|
246
246
|
- MIT
|
|
247
247
|
metadata:
|
|
248
248
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
249
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
|
250
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
|
249
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.8.6/actionview/CHANGELOG.md
|
|
250
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.8.6/
|
|
251
251
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
252
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
|
252
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.8.6/actionview
|
|
253
253
|
rubygems_mfa_required: 'true'
|
|
254
254
|
post_install_message:
|
|
255
255
|
rdoc_options: []
|
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
267
267
|
version: '0'
|
|
268
268
|
requirements:
|
|
269
269
|
- none
|
|
270
|
-
rubygems_version: 3.
|
|
270
|
+
rubygems_version: 3.5.16
|
|
271
271
|
signing_key:
|
|
272
272
|
specification_version: 4
|
|
273
273
|
summary: Rendering framework putting the V in MVC (part of Rails).
|