activemodel 7.0.8.6 → 7.0.9

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: e289cdc76a9ec9d327c1c08dc126f1afe69481e0e242dfda54fe10e975f83e09
4
- data.tar.gz: a581cc5b0d46d8f5ecc6506a890f3fd5a0a36118093951613da9e82c312273c0
3
+ metadata.gz: af1e130b7197eb4b28a28f40a1b6725b6a8cfa5346decedfe8998450488e3d72
4
+ data.tar.gz: cb038e74ff610855bbcbc3d74adf21764daf3488ee2912ad1c34514fdfbfbd07
5
5
  SHA512:
6
- metadata.gz: a4fd63d2ec145a2deb698110f5525902495f6c5d443f8222d579f399df6c3b197c8aec40d50afe6fc77ae66156a3276c6b28143f731444152d871e5c59ad3340
7
- data.tar.gz: c9fb8423892642e93c01c6685f92a2e2ec1bdf3275b8965643b92f985988fe85700273851b8a6ebb5a57132b3f1628146fa162e2a087cf96b9c36e739b175d43
6
+ metadata.gz: bfc0222183ff431a501a8d5efd8630714d1a8316cd714447caea4044a25044df13d6f6339b0cf0ee664307f19dd26aeb313e57f23c2e81929e0f1e1bb15e3e9f
7
+ data.tar.gz: 07c2a80270a55882b2e779dd28ff515cf5339a7bbb773fe23d4eb4473cb1fbe8ae6f61be49404fdce686bf6c900bff6bd902d4e5f0318942fb345491bb5d925a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## Rails 7.0.9 (October 28, 2025) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 7.0.8.7 (December 10, 2024) ##
7
+
8
+ * No changes.
9
+
10
+
1
11
  ## Rails 7.0.8.6 (October 23, 2024) ##
2
12
 
3
13
  * No changes.
@@ -64,6 +64,7 @@ module ActiveModel
64
64
 
65
65
  extend Forwardable
66
66
 
67
+ ##
67
68
  # :method: each
68
69
  #
69
70
  # :call-seq: each(&block)
@@ -75,6 +76,31 @@ module ActiveModel
75
76
  # # Will yield <#ActiveModel::Error attribute=name, type=too_short,
76
77
  # options={:count=>3}>
77
78
  # end
79
+
80
+ ##
81
+ # :method: clear
82
+ #
83
+ # :call-seq: clear
84
+ #
85
+ # Clears all errors. Clearing the errors does not, however, make the model
86
+ # valid. The next time the validations are run (for example, via
87
+ # ActiveRecord::Validations#valid?), the errors collection will be filled
88
+ # again if any validations fail.
89
+
90
+ ##
91
+ # :method: empty?
92
+ #
93
+ # :call-seq: empty?
94
+ #
95
+ # Returns true if there are no errors.
96
+
97
+ ##
98
+ # :method: size
99
+ #
100
+ # :call-seq: size
101
+ #
102
+ # Returns number of errors.
103
+
78
104
  def_delegators :@errors, :each, :clear, :empty?, :size, :uniq!
79
105
 
80
106
  # The actual array of +Error+ objects
@@ -9,8 +9,8 @@ module ActiveModel
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 8
13
- PRE = "6"
12
+ TINY = 9
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -38,7 +38,8 @@ module ActiveModel
38
38
  end
39
39
 
40
40
  def number_to_non_number?(old_value, new_value_before_type_cast)
41
- old_value != nil && non_numeric_string?(new_value_before_type_cast.to_s)
41
+ old_value != nil && !new_value_before_type_cast.is_a?(::Numeric) &&
42
+ non_numeric_string?(new_value_before_type_cast.to_s)
42
43
  end
43
44
 
44
45
  def non_numeric_string?(value)
@@ -10,7 +10,7 @@ module ActiveModel
10
10
  # validators can be overridden inside specific classes by creating
11
11
  # custom validator classes in their place such as PresenceValidator.
12
12
  #
13
- # Examples of using the default rails validators:
13
+ # Examples of using the default \Rails validators:
14
14
  #
15
15
  # validates :username, absence: true
16
16
  # validates :terms, acceptance: true
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.6
4
+ version: 7.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: 7.0.8.6
18
+ version: 7.0.9
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: 7.0.8.6
25
+ version: 7.0.9
27
26
  description: A toolkit for building modeling frameworks like Active Record. Rich support
28
27
  for attributes, callbacks, validations, serialization, internationalization, and
29
28
  testing.
@@ -107,12 +106,11 @@ licenses:
107
106
  - MIT
108
107
  metadata:
109
108
  bug_tracker_uri: https://github.com/rails/rails/issues
110
- changelog_uri: https://github.com/rails/rails/blob/v7.0.8.6/activemodel/CHANGELOG.md
111
- documentation_uri: https://api.rubyonrails.org/v7.0.8.6/
109
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.9/activemodel/CHANGELOG.md
110
+ documentation_uri: https://api.rubyonrails.org/v7.0.9/
112
111
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
113
- source_code_uri: https://github.com/rails/rails/tree/v7.0.8.6/activemodel
112
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.9/activemodel
114
113
  rubygems_mfa_required: 'true'
115
- post_install_message:
116
114
  rdoc_options: []
117
115
  require_paths:
118
116
  - lib
@@ -127,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
125
  - !ruby/object:Gem::Version
128
126
  version: '0'
129
127
  requirements: []
130
- rubygems_version: 3.5.16
131
- signing_key:
128
+ rubygems_version: 3.6.9
132
129
  specification_version: 4
133
130
  summary: A toolkit for building modeling frameworks (part of Rails).
134
131
  test_files: []