actionview 7.0.7.2 → 7.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a673faf2d3692c6a30dda5cbb131687c59c0d1b00633bf2959d55d3a2358823
4
- data.tar.gz: f6546650fe4f3514c487ab4e0e296e30adfe06a15d67b61d3ed0c48e9facf752
3
+ metadata.gz: a569f4f8e520c94ea5c5f0b9ab2005dd9a53e3d665bb11ecedf0f76886b6b848
4
+ data.tar.gz: 4e0fc28a999734b27cf9c02900cca0dc36670e89529cbb67d8f0d72e121f5593
5
5
  SHA512:
6
- metadata.gz: '09f84263ee88d51f4d3b700986e9cd97c93253f7a7e105d856ccebf0aebe137cd59ea15d96610a1540dfbd92c2ddbcb7bb0866334f76813979f06a0726ecd69e'
7
- data.tar.gz: d7423d2de9e574f358740fd5010d660e98ead150e8a58bbd6e83d221076b1c59f03c8e063652aebe41a06b1b0ab45ff182a73664be04f9a3181abc961640e259
6
+ metadata.gz: 3ce2666c92327eeef024073a9780fd53c10320ef0b10c07d200fffe7ca9ec4d7634ad045a958f136a3c64432db5d2aff59b12e3ed81037118b6e67083398af64
7
+ data.tar.gz: 92089fb1751e5399ddd65b5728067ff4cec2751823a320dce88418d430a22ff18c29e84fc186eb5c3514becbeb39fd372ab87f41fd44fc1543a46097642c04e1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## Rails 7.0.8 (September 09, 2023) ##
2
+
3
+ * Fix `form_for` missing the hidden `_method` input for models with a
4
+ namespaced route.
5
+
6
+ *Hartley McGuire*
7
+
8
+ * Fix `render collection: @records, cache: true` inside `jbuilder` templates
9
+
10
+ The previous fix that shipped in `7.0.7` assumed template fragments are always strings,
11
+ this isn't true with `jbuilder`.
12
+
13
+ *Jean Boussier*
14
+
1
15
  ## Rails 7.0.7.2 (August 22, 2023) ##
2
16
 
3
17
  * No changes.
@@ -9,8 +9,8 @@ module ActionView
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 7
13
- PRE = "2"
12
+ TINY = 8
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -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
 
@@ -95,9 +95,16 @@ module ActionView
95
95
  build_rendered_template(content, template)
96
96
  else
97
97
  rendered_partial = yield
98
- if fragment = rendered_partial.body&.to_str
99
- entries_to_write[cache_key] = fragment
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
100
105
  end
106
+
107
+ entries_to_write[cache_key] = body
101
108
  rendered_partial
102
109
  end
103
110
  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.7.2
4
+ version: 7.0.8
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: 2023-08-22 00:00:00.000000000 Z
11
+ date: 2023-09-09 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.7.2
19
+ version: 7.0.8
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.7.2
26
+ version: 7.0.8
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.7.2
95
+ version: 7.0.8
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.7.2
102
+ version: 7.0.8
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.7.2
109
+ version: 7.0.8
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.7.2
116
+ version: 7.0.8
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.7.2/actionview/CHANGELOG.md
250
- documentation_uri: https://api.rubyonrails.org/v7.0.7.2/
249
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.8/actionview/CHANGELOG.md
250
+ documentation_uri: https://api.rubyonrails.org/v7.0.8/
251
251
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
252
- source_code_uri: https://github.com/rails/rails/tree/v7.0.7.2/actionview
252
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.8/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.3.3
270
+ rubygems_version: 3.4.18
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: Rendering framework putting the V in MVC (part of Rails).