activemodel 7.1.2 → 7.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d422c81f75030bb5e3d60be5a7d8790304fd16f272b79e9b7a0db8062fe2cf0
4
- data.tar.gz: 1210ef5f7d3dc8f14fcc5367d54b1200d829cf94675892c8e184a16fa6948a04
3
+ metadata.gz: 6e5c0b020fa6fba4739851c19c0604c1d81c281a57965e975edd16fcf80e1c7e
4
+ data.tar.gz: 913e80704ba0338e602bbe390683e3240e28d12bd4378c9509060a1e88b0de12
5
5
  SHA512:
6
- metadata.gz: 91cef29372bf12f285bacc1f54c0916838f5ad7edf171d310c07ce9172b498615793f7699e58a183216caae83eb5e127e4b994a07e9c6b60185da470f857fd4e
7
- data.tar.gz: 85e338ecc5720d7ddd066c6bb0e91e8f72b41ea89efb322221da2c80c20a023f3c343e475e611d275c5ef983368fe61448cd7cfd6104347792e7ee572dc11bfb
6
+ metadata.gz: 8eeac4165c4b450caf8522be9a2a3eac5e8e1cae4cefe29aad7264011e8d786f09cb94266702a5d4ab30ae227328a343f7a16c720287c696490bee3cb1a58416
7
+ data.tar.gz: 70e0b83b0b24e08ee6803bf51bd9ad95c2eb76529bfa7c67cf6d5bbe200c330f99a1d9343c9a8b0272538896d9eaf711c0b1072b430aea8856556a8d5579ca79
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Rails 7.1.3 (January 16, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 7.1.2 (November 10, 2023) ##
2
7
 
3
8
  * Make `==(other)` method of AttributeSet safe.
@@ -187,7 +187,7 @@ module ActiveModel
187
187
  #
188
188
  # person = Person.new(name: 'Steph')
189
189
  # person.name = 'Stephanie'
190
- # person.name_change # => ['Steph', 'Stephanie']
190
+ # person.name_was # => 'Steph'
191
191
 
192
192
  ##
193
193
  # :method: *_previous_change
@@ -63,6 +63,7 @@ module ActiveModel
63
63
 
64
64
  extend Forwardable
65
65
 
66
+ ##
66
67
  # :method: each
67
68
  #
68
69
  # :call-seq: each(&block)
@@ -74,6 +75,31 @@ module ActiveModel
74
75
  # # Will yield <#ActiveModel::Error attribute=name, type=too_short,
75
76
  # options={:count=>3}>
76
77
  # end
78
+
79
+ ##
80
+ # :method: clear
81
+ #
82
+ # :call-seq: clear
83
+ #
84
+ # Clears all errors. Clearing the errors does not, however, make the model
85
+ # valid. The next time the validations are run (for example, via
86
+ # ActiveRecord::Validations#valid?), the errors collection will be filled
87
+ # again if any validations fail.
88
+
89
+ ##
90
+ # :method: empty?
91
+ #
92
+ # :call-seq: empty?
93
+ #
94
+ # Returns true if there are no errors.
95
+
96
+ ##
97
+ # :method: size
98
+ #
99
+ # :call-seq: size
100
+ #
101
+ # Returns number of errors.
102
+
77
103
  def_delegators :@errors, :each, :clear, :empty?, :size, :uniq!
78
104
 
79
105
  # The actual array of +Error+ objects
@@ -9,7 +9,7 @@ module ActiveModel
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 1
12
- TINY = 2
12
+ TINY = 3
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -52,6 +52,10 @@ module ActiveModel
52
52
  # Returns a hash of the given methods with their names as keys and returned
53
53
  # values as values.
54
54
  #
55
+ # person = Person.new(id: 1, name: "bob")
56
+ # person.slice(:id, :name)
57
+ # => { "id" => 1, "name" => "bob" }
58
+ #
55
59
  #--
56
60
  # Implemented by ActiveModel::Access#slice.
57
61
 
@@ -62,6 +66,10 @@ module ActiveModel
62
66
  #
63
67
  # Returns an array of the values returned by the given methods.
64
68
  #
69
+ # person = Person.new(id: 1, name: "bob")
70
+ # person.values_at(:id, :name)
71
+ # => [1, "bob"]
72
+ #
65
73
  #--
66
74
  # Implemented by ActiveModel::Access#values_at.
67
75
  end
@@ -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,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.2
4
+ version: 7.1.3
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-11-10 00:00:00.000000000 Z
11
+ date: 2024-01-16 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.1.2
19
+ version: 7.1.3
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.1.2
26
+ version: 7.1.3
27
27
  description: A toolkit for building modeling frameworks like Active Record. Rich support
28
28
  for attributes, callbacks, validations, serialization, internationalization, and
29
29
  testing.
@@ -112,10 +112,10 @@ licenses:
112
112
  - MIT
113
113
  metadata:
114
114
  bug_tracker_uri: https://github.com/rails/rails/issues
115
- changelog_uri: https://github.com/rails/rails/blob/v7.1.2/activemodel/CHANGELOG.md
116
- documentation_uri: https://api.rubyonrails.org/v7.1.2/
115
+ changelog_uri: https://github.com/rails/rails/blob/v7.1.3/activemodel/CHANGELOG.md
116
+ documentation_uri: https://api.rubyonrails.org/v7.1.3/
117
117
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
118
- source_code_uri: https://github.com/rails/rails/tree/v7.1.2/activemodel
118
+ source_code_uri: https://github.com/rails/rails/tree/v7.1.3/activemodel
119
119
  rubygems_mfa_required: 'true'
120
120
  post_install_message:
121
121
  rdoc_options: []