can_has_validations 1.4.0 → 1.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a60d6f36d2de2de081e45e2608c207d3cc81447900b2f0c7ef61727373fb2819
|
4
|
+
data.tar.gz: aed858aa2888e7646b3878dd039052b0196d9a41e64188bcf45f494dc3bb0e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db744b1438739df7fd6aae9d071ccbae7683c405fab61ff56307045d2312760b8559b950246a8c578aa3e58c6fdff3d0bbe8f7a27c520d95ea92902b9ef2ef52
|
7
|
+
data.tar.gz: 17486807b2bede046e96282943b8dfa76154e4283d20b8ec18958154f75a24508e919786f2b5e2f802315ee4246c41bfa187b24f93769e67d14767496c34c419
|
@@ -18,7 +18,9 @@ module ActiveModel::Validations
|
|
18
18
|
|
19
19
|
def validate_each(record, attribute, _)
|
20
20
|
return unless record.persisted?
|
21
|
-
if !record.respond_to?("#{attribute}_changed?")
|
21
|
+
if ( !record.respond_to?("#{attribute}_changed?") ||
|
22
|
+
!record.respond_to?("#{attribute}_was")
|
23
|
+
) && record.respond_to?("#{attribute}_id_changed?")
|
22
24
|
attr2 = "#{attribute}_id"
|
23
25
|
else
|
24
26
|
attr2 = attribute
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: can_has_validations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '5.
|
19
|
+
version: '5.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '5.
|
29
|
+
version: '5.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: sqlite3
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
-
description: 'Assorted Rails 5.x-
|
47
|
+
description: 'Assorted Rails 5.x-7.x validators: Array, Email, Existence, Grandparent,
|
48
48
|
Hash keys, Hash values, Hostname, IP address, Ordering, URL, Write Once'
|
49
49
|
email:
|
50
50
|
- tm@iprog.com
|
@@ -124,7 +124,7 @@ requirements: []
|
|
124
124
|
rubygems_version: 3.2.22
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
|
-
summary: Assorted Rails 5.x-
|
127
|
+
summary: Assorted Rails 5.x-7.x validators
|
128
128
|
test_files:
|
129
129
|
- test/can_has_validations_test.rb
|
130
130
|
- test/dummy/README.rdoc
|