activemodel 8.0.2.1 → 8.0.3

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: c988bbf0305fd8d20b9c86ef0f1543210703caf7d1be7e2be8d2f340313a02b2
4
- data.tar.gz: 15a95a56369475bbc7405169654171cdfcf72811d09392336b20c05a444b5ac8
3
+ metadata.gz: 16b040fd5a62c0392cc172673913fcb87cdb1aa6314bc12a3b54c4b50a20ed94
4
+ data.tar.gz: d7e329b88a5c375b5e65c03e30b5469996b966ec3a6e8f15492c3c2f099205a0
5
5
  SHA512:
6
- metadata.gz: 796c0ae9f3004ef5fd0f2562864a571e34eba8eedfed3dd40f211df7171274e760de8f8dce8f9907e61b31fdb1838e6c4796ac0adfa0e48898ff101e385f62d6
7
- data.tar.gz: ed3de7df1c7d0e832a81c2c69e0b19ad0c722dea9e0725ed1cc47ded182ae2b08647a4bf07c55302aba06cac780920913900ce1fd4afd4674b81b0754cc7b934
6
+ metadata.gz: '04859dbfdb1a4e16f0e4d391ca49a149f588926e19b4175cd0338f047a98b88df2edca6eef049098e268a12f494877294441fb748d52ed576e9ab65f6ef64dc3'
7
+ data.tar.gz: 17a3fd0fd7d386aa3997bfdf247b0a386ec00b879fc0922422b82c25675cf021092f44e8c32bc142fc57db01c97524123d3cca6e7ddd8718a6cc747d7e27c6f9
data/CHANGELOG.md CHANGED
@@ -1,9 +1,13 @@
1
- ## Rails 8.0.2.1 (August 13, 2025) ##
1
+ ## Rails 8.0.3 (September 22, 2025) ##
2
2
 
3
- * No changes.
3
+ * Fix `has_secure_password` to perform confirmation validation of the password even when blank.
4
4
 
5
+ The validation was incorrectly skipped when the password only contained whitespace characters.
5
6
 
6
- ## Rails 8.0.2 (March 12, 2025) ##
7
+ *Fabio Sangiovanni*
8
+
9
+
10
+ ## Rails 8.0.2.1 (August 13, 2025) ##
7
11
 
8
12
  * No changes.
9
13
 
data/README.rdoc CHANGED
@@ -261,6 +261,6 @@ Bug reports for the Ruby on \Rails project can be filed here:
261
261
 
262
262
  * https://github.com/rails/rails/issues
263
263
 
264
- Feature requests should be discussed on the rails-core mailing list here:
264
+ Feature requests should be discussed on the rubyonrails-core forum here:
265
265
 
266
266
  * https://discuss.rubyonrails.org/c/rubyonrails-core
@@ -108,7 +108,7 @@ module ActiveModel
108
108
  # person.changes # => {"name" => ["Bill", "Bob"]}
109
109
  #
110
110
  # If an attribute is modified in-place then make use of
111
- # {*_will_change!}[rdoc-label:method-i-2A_will_change-21] to mark that the attribute is changing.
111
+ # {*_will_change!}[rdoc-ref:#*_will_change!] to mark that the attribute is changing.
112
112
  # Otherwise \Active \Model can't track changes to in-place attributes. Note
113
113
  # that Active Record can detect in-place modifications automatically. You do
114
114
  # not need to call <tt>*_will_change!</tt> on Active Record models.
@@ -296,22 +296,22 @@ module ActiveModel
296
296
  mutations_from_database.changed_attribute_names
297
297
  end
298
298
 
299
- # Dispatch target for {*_changed?}[rdoc-label:method-i-2A_changed-3F] attribute methods.
299
+ # Dispatch target for {*_changed?}[rdoc-ref:#*_changed?] attribute methods.
300
300
  def attribute_changed?(attr_name, **options)
301
301
  mutations_from_database.changed?(attr_name.to_s, **options)
302
302
  end
303
303
 
304
- # Dispatch target for {*_was}[rdoc-label:method-i-2A_was] attribute methods.
304
+ # Dispatch target for {*_was}[rdoc-ref:#*_was] attribute methods.
305
305
  def attribute_was(attr_name)
306
306
  mutations_from_database.original_value(attr_name.to_s)
307
307
  end
308
308
 
309
- # Dispatch target for {*_previously_changed?}[rdoc-label:method-i-2A_previously_changed-3F] attribute methods.
309
+ # Dispatch target for {*_previously_changed?}[rdoc-ref:#*_previously_changed?] attribute methods.
310
310
  def attribute_previously_changed?(attr_name, **options)
311
311
  mutations_before_last_save.changed?(attr_name.to_s, **options)
312
312
  end
313
313
 
314
- # Dispatch target for {*_previously_was}[rdoc-label:method-i-2A_previously_was] attribute methods.
314
+ # Dispatch target for {*_previously_was}[rdoc-ref:#*_previously_was] attribute methods.
315
315
  def attribute_previously_was(attr_name)
316
316
  mutations_before_last_save.original_value(attr_name.to_s)
317
317
  end
@@ -9,8 +9,8 @@ module ActiveModel
9
9
  module VERSION
10
10
  MAJOR = 8
11
11
  MINOR = 0
12
- TINY = 2
13
- PRE = "1"
12
+ TINY = 3
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -54,7 +54,7 @@ module ActiveModel
54
54
  #
55
55
  # person = Person.new(id: 1, name: "bob")
56
56
  # person.slice(:id, :name)
57
- # => { "id" => 1, "name" => "bob" }
57
+ # # => { "id" => 1, "name" => "bob" }
58
58
  #
59
59
  #--
60
60
  # Implemented by ActiveModel::Access#slice.
@@ -68,7 +68,7 @@ module ActiveModel
68
68
  #
69
69
  # person = Person.new(id: 1, name: "bob")
70
70
  # person.values_at(:id, :name)
71
- # => [1, "bob"]
71
+ # # => [1, "bob"]
72
72
  #
73
73
  #--
74
74
  # Implemented by ActiveModel::Access#values_at.
@@ -155,7 +155,7 @@ module ActiveModel
155
155
  end
156
156
  end
157
157
 
158
- validates_confirmation_of attribute, allow_blank: true
158
+ validates_confirmation_of attribute, allow_nil: true
159
159
  end
160
160
 
161
161
  # Only generate tokens for records that are capable of doing so (Active Records, not vanilla Active Models)
@@ -63,7 +63,8 @@ module ActiveModel
63
63
  # end
64
64
  # end
65
65
  #
66
- # Options:
66
+ # ==== Options
67
+ #
67
68
  # * <tt>:on</tt> - Specifies the contexts where this validation is active.
68
69
  # Runs in all validation contexts by default +nil+. You can pass a symbol
69
70
  # or an array of symbols. (e.g. <tt>on: :create</tt> or
@@ -134,7 +135,8 @@ module ActiveModel
134
135
  # Note that the return value of validation methods is not relevant.
135
136
  # It's not possible to halt the validate callback chain.
136
137
  #
137
- # Options:
138
+ # ==== Options
139
+ #
138
140
  # * <tt>:on</tt> - Specifies the contexts where this validation is active.
139
141
  # Runs in all validation contexts by default +nil+. You can pass a symbol
140
142
  # or an array of symbols. (e.g. <tt>on: :create</tt> or
@@ -145,14 +147,14 @@ module ActiveModel
145
147
  # or an array of symbols. (e.g. <tt>except: :create</tt> or
146
148
  # <tt>except_on: :custom_validation_context</tt> or
147
149
  # <tt>except_on: [:create, :custom_validation_context]</tt>)
148
- # * <tt>:if</tt> - Specifies a method, proc or string to call to determine
150
+ # * <tt>:if</tt> - Specifies a method or proc to call to determine
149
151
  # if the validation should occur (e.g. <tt>if: :allow_validation</tt>,
150
- # or <tt>if: Proc.new { |user| user.signup_step > 2 }</tt>). The method,
151
- # proc or string should return or evaluate to a +true+ or +false+ value.
152
- # * <tt>:unless</tt> - Specifies a method, proc, or string to call to
152
+ # or <tt>if: Proc.new { |user| user.signup_step > 2 }</tt>). The method or
153
+ # proc should return or evaluate to a +true+ or +false+ value.
154
+ # * <tt>:unless</tt> - Specifies a method or proc to call to
153
155
  # determine if the validation should not occur (e.g. <tt>unless: :skip_validation</tt>,
154
156
  # or <tt>unless: Proc.new { |user| user.signup_step <= 2 }</tt>). The
155
- # method, proc, or string should return or evaluate to a +true+ or +false+
157
+ # method or proc should return or evaluate to a +true+ or +false+
156
158
  # value.
157
159
  #
158
160
  # NOTE: Calling +validate+ multiple times on the same method will overwrite previous definitions.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.2.1
4
+ version: 8.0.3
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.2.1
18
+ version: 8.0.3
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.2.1
25
+ version: 8.0.3
26
26
  description: A toolkit for building modeling frameworks like Active Record. Rich support
27
27
  for attributes, callbacks, validations, serialization, internationalization, and
28
28
  testing.
@@ -111,10 +111,10 @@ licenses:
111
111
  - MIT
112
112
  metadata:
113
113
  bug_tracker_uri: https://github.com/rails/rails/issues
114
- changelog_uri: https://github.com/rails/rails/blob/v8.0.2.1/activemodel/CHANGELOG.md
115
- documentation_uri: https://api.rubyonrails.org/v8.0.2.1/
114
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.3/activemodel/CHANGELOG.md
115
+ documentation_uri: https://api.rubyonrails.org/v8.0.3/
116
116
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
117
- source_code_uri: https://github.com/rails/rails/tree/v8.0.2.1/activemodel
117
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.3/activemodel
118
118
  rubygems_mfa_required: 'true'
119
119
  rdoc_options: []
120
120
  require_paths: