actionview 8.1.1 → 8.1.2

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: c5545af4ab202d39f3f7111fb2af3778caf64f0bcaac05a8e954ad6c173b9f42
4
- data.tar.gz: 5b132e24b9c1aab23bbf0778a0eb0cbb238923105e2385b2b1445826ceb6b2a3
3
+ metadata.gz: 5744f9f03363cee6bb6119e05f065b891143193967773bb6c9798ba08f5cf913
4
+ data.tar.gz: 5290a6f008203823f1b6a4aca07916475fc80ca02de83ea5a16e7ebeab02102c
5
5
  SHA512:
6
- metadata.gz: 91ad740f9980fa1f8ad77b3f89a4cc4b5b366f9b903fb9937a4978b3f90b675da0d0b7efbf0fde1d0c0edcb1b136cfb662a51f1c9cbe8eb354f96fdf330d272c
7
- data.tar.gz: afc56f12a6a009791485f8f8b9e27f9a699e094d956fa3557036ebfa7f63bc50757333051b57ed739fea5c4311511f6f8e32c1808220e4ad6ede14d8a6a1f40d
6
+ metadata.gz: 56c52dfb00b9d4b7b1785efac2d74a334a65140ef93bf24ace09a2653f8c717a50990ed1b37662bdec4e1af2a2e4624001a5da4276a9610d709b559d541a59de
7
+ data.tar.gz: eb0953de4b065cc23aea27da97268891cb4656dbe2439762a1fa4b9a26436dbd27dd89c4d1f365df5a2525b70fc09ff8eb6a8602da3ffe90acaac7f8687e4bbc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## Rails 8.1.2 (January 08, 2026) ##
2
+
3
+ * Fix `file_field` to join mime types with a comma when provided as Array
4
+
5
+ ```ruby
6
+ file_field(:article, :image, accept: ['image/png', 'image/gif', 'image/jpeg'])
7
+ ```
8
+
9
+ Now behaves likes:
10
+
11
+ ```
12
+ file_field(:article, :image, accept: 'image/png,image/gif,image/jpeg')
13
+ ```
14
+
15
+ *Bogdan Gusiev*
16
+
17
+ * Fix strict locals parsing to handle multiline definitions.
18
+
19
+ *Said Kaldybaev*
20
+
21
+ * Fix `content_security_policy_nonce` error in mailers when using `content_security_policy_nonce_auto` setting.
22
+
23
+ The `content_security_policy_nonce helper` is provided by `ActionController::ContentSecurityPolicy`, and it relies on `request.content_security_policy_nonc`e. Mailers lack both the module and the request object.
24
+
25
+ *Jarrett Lusso*
26
+
27
+
1
28
  ## Rails 8.1.1 (October 28, 2025) ##
2
29
 
3
30
  * Respect `remove_hidden_field_autocomplete` config in form builder `hidden_field`.
@@ -9,7 +9,7 @@ module ActionView
9
9
  module VERSION
10
10
  MAJOR = 8
11
11
  MINOR = 1
12
- TINY = 1
12
+ TINY = 2
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -229,7 +229,7 @@ module ActionView
229
229
  "crossorigin" => crossorigin,
230
230
  "href" => href
231
231
  }.merge!(options)
232
- if tag_options["nonce"] == true || (!tag_options.key?("nonce") && auto_include_nonce_for_styles)
232
+ if tag_options["nonce"] == true || (!tag_options.key?("nonce") && auto_include_nonce_for_styles && respond_to?(:content_security_policy_nonce))
233
233
  tag_options["nonce"] = content_security_policy_nonce
234
234
  elsif tag_options["nonce"] == false
235
235
  tag_options.delete("nonce")
@@ -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
 
@@ -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,7 +366,7 @@ 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
 
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.1.1
4
+ version: 8.1.2
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.1.1
18
+ version: 8.1.2
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.1.1
25
+ version: 8.1.2
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.1.1
88
+ version: 8.1.2
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.1.1
95
+ version: 8.1.2
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.1.1
102
+ version: 8.1.2
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.1.1
109
+ version: 8.1.2
110
110
  description: Simple, battle-tested conventions and helpers for building web pages.
111
111
  email: david@loudthinking.com
112
112
  executables: []
@@ -247,10 +247,10 @@ licenses:
247
247
  - MIT
248
248
  metadata:
249
249
  bug_tracker_uri: https://github.com/rails/rails/issues
250
- changelog_uri: https://github.com/rails/rails/blob/v8.1.1/actionview/CHANGELOG.md
251
- documentation_uri: https://api.rubyonrails.org/v8.1.1/
250
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.2/actionview/CHANGELOG.md
251
+ documentation_uri: https://api.rubyonrails.org/v8.1.2/
252
252
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
253
- source_code_uri: https://github.com/rails/rails/tree/v8.1.1/actionview
253
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.2/actionview
254
254
  rubygems_mfa_required: 'true'
255
255
  rdoc_options: []
256
256
  require_paths:
@@ -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.6.9
270
+ rubygems_version: 4.0.3
271
271
  specification_version: 4
272
272
  summary: Rendering framework putting the V in MVC (part of Rails).
273
273
  test_files: []