actionview 8.0.4.1 → 8.0.5

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: db69362edf94a58af2281f36919c695039e5e2e7be5707b36ee6a6553deaddcf
4
- data.tar.gz: 4343c2bcf50ed9237feb87fb8c295e16ae37b5bda5b66573d0f47d3efb2fb40c
3
+ metadata.gz: 37987aa62646838570a7a8167d4f913d4b8019e7c03a756c34d6fb394f76ab5f
4
+ data.tar.gz: 22d8090b406f2bca0b4049b85df4d66740ef778a2d58f699d205154247fd7b03
5
5
  SHA512:
6
- metadata.gz: a5a42c58fe67751baf3004a2cb5e1fbcc843c23dc01c668eb5e9de02c2a68fe776e808a9076f9b8af5842bb33770fe1110814dab70d6906751762bdf550595f2
7
- data.tar.gz: 806f5955af447cf19e200ad782f7ae65c9ba3d1d2587f4af04a8a58fc13b6d85ff7dcf28dc8db1976b37cf5108201696bcb594818ee188cb22f5f52c70554134
6
+ metadata.gz: c140a8cf5c4ceed7879f29df22dbfb90adde9b111f3bf34c85f447e60b05841e819ceb0c7c699683505079368013570e336a7318cf6cca4174e1851606d1c542
7
+ data.tar.gz: 63ccdfbe1489d624b520aaf070f1b16c17b4f3a8c85b1f1f76dec9f0d51c74e7cb9868c6792fbebd9629251da14a7defd128f9754d6b849b262fc1a5d7174531
data/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## Rails 8.0.5 (March 24, 2026) ##
2
+
3
+ * Fix encoding errors for string locals containing non-ASCII characters.
4
+
5
+ *Kataoka Katsuki*
6
+
7
+ * Fix collection caching to only forward `expires_in` argument if explicitly set.
8
+
9
+ *Pieter Visser*
10
+
11
+ * Fix `file_field` to join mime types with a comma when provided as Array
12
+
13
+ ```ruby
14
+ file_field(:article, :image, accept: ['image/png', 'image/gif', 'image/jpeg'])
15
+ ```
16
+
17
+ Now behaves likes:
18
+
19
+ ```
20
+ file_field(:article, :image, accept: 'image/png,image/gif,image/jpeg')
21
+ ```
22
+
23
+ *Bogdan Gusiev*
24
+
25
+ * Fix strict locals parsing to handle multiline definitions.
26
+
27
+ *Said Kaldybaev*
28
+
29
+
1
30
  ## Rails 8.0.4.1 (March 23, 2026) ##
2
31
 
3
32
  * Skip blank attribute names in tag helpers to avoid generating invalid HTML.
@@ -9,8 +9,8 @@ module ActionView
9
9
  module VERSION
10
10
  MAJOR = 8
11
11
  MINOR = 0
12
- TINY = 4
13
- PRE = "1"
12
+ TINY = 5
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -6,6 +6,9 @@ module ActionView
6
6
  class FileField < TextField # :nodoc:
7
7
  def render
8
8
  include_hidden = @options.delete(:include_hidden)
9
+ if @options[:accept].is_a?(Array)
10
+ @options[:accept] = @options[:accept].join(",")
11
+ end
9
12
  options = @options.stringify_keys
10
13
  add_default_name_and_field(options)
11
14
 
@@ -111,7 +111,11 @@ module ActionView
111
111
  end
112
112
 
113
113
  unless entries_to_write.empty?
114
- collection_cache.write_multi(entries_to_write)
114
+ if @options[:cached].is_a?(Hash) && @options[:cached].key?(:expires_in)
115
+ collection_cache.write_multi(entries_to_write, expires_in: @options[:cached][:expires_in])
116
+ else
117
+ collection_cache.write_multi(entries_to_write)
118
+ end
115
119
  end
116
120
 
117
121
  keyed_partials
@@ -7,7 +7,7 @@ module ActionView
7
7
  class Template
8
8
  extend ActiveSupport::Autoload
9
9
 
10
- STRICT_LOCALS_REGEX = /\#\s+locals:\s+\((.*)\)/
10
+ STRICT_LOCALS_REGEX = /\#\s+locals:\s+\((.*?)\)(?=\s*-?%>|\s*$)/m
11
11
 
12
12
  # === Encodings in ActionView::Template
13
13
  #
@@ -366,10 +366,16 @@ module ActionView
366
366
  def strict_locals!
367
367
  if @strict_locals == NONE
368
368
  self.source.sub!(STRICT_LOCALS_REGEX, "")
369
- @strict_locals = $1
369
+ @strict_locals = $1&.rstrip
370
370
 
371
371
  return if @strict_locals.nil? # Magic comment not found
372
372
 
373
+ # Tag with the assumed encoding before encode! runs, same as
374
+ # encode! does for the source itself (see above).
375
+ if @strict_locals.encoding == Encoding::BINARY
376
+ @strict_locals.force_encoding(Encoding.default_external)
377
+ end
378
+
373
379
  @strict_locals = "**nil" if @strict_locals.blank?
374
380
  end
375
381
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionview
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.4.1
4
+ version: 8.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 8.0.4.1
18
+ version: 8.0.5
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 8.0.4.1
25
+ version: 8.0.5
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: builder
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -85,28 +85,28 @@ dependencies:
85
85
  requirements:
86
86
  - - '='
87
87
  - !ruby/object:Gem::Version
88
- version: 8.0.4.1
88
+ version: 8.0.5
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 8.0.4.1
95
+ version: 8.0.5
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: activemodel
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 8.0.4.1
102
+ version: 8.0.5
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 8.0.4.1
109
+ version: 8.0.5
110
110
  description: Simple, battle-tested conventions and helpers for building web pages.
111
111
  email: david@loudthinking.com
112
112
  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/v8.0.4.1/actionview/CHANGELOG.md
250
- documentation_uri: https://api.rubyonrails.org/v8.0.4.1/
249
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.5/actionview/CHANGELOG.md
250
+ documentation_uri: https://api.rubyonrails.org/v8.0.5/
251
251
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
252
- source_code_uri: https://github.com/rails/rails/tree/v8.0.4.1/actionview
252
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.5/actionview
253
253
  rubygems_mfa_required: 'true'
254
254
  rdoc_options: []
255
255
  require_paths: