has_contact_number 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/has_contact_number/model_methods.rb +2 -2
- data/lib/has_contact_number/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0d6f2ceda252bfaa8e201a00dab49eddbbb8d255dce3c0448e75714f88691611
|
4
|
+
data.tar.gz: e990269f749439e1f459cbe74a234bb78199b6506d7c07bbc49ea568ef7ce652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a6bb1066c31d3a32389133c75d452100e432090a29c74e20fa80be6e4d90c4b022e235e2d3313d5f1ce44953ca4709a0cd8ce6a53fcb96a2ca64114f35668df
|
7
|
+
data.tar.gz: a105044c1d825981af97fbabf8fbe42c4f0cb3d2b11f90176e50e2154a6d6b3613b514ad050845e8c438d1beed3573f0aeaffa773af528dac54a738612f4f8a6
|
@@ -28,8 +28,8 @@ module HasContactNumber::ModelMethods
|
|
28
28
|
model.#{column} = model.#{column}_isd_code + model.#{column}_without_isd_code
|
29
29
|
}
|
30
30
|
|
31
|
-
validates :#{column}_isd_code, presence: true, if:
|
32
|
-
validates :#{column}_without_isd_code, presence: true, if:
|
31
|
+
validates :#{column}_isd_code, presence: true, if: proc { |model| model.#{column}_without_isd_code.present? }
|
32
|
+
validates :#{column}_without_isd_code, presence: true, if: proc { |model| model.#{column}_isd_code.present? }
|
33
33
|
validates :#{column}, phony_plausible: true, if: proc { |model|
|
34
34
|
model.#{column}_isd_code.present? && model.#{column}_without_isd_code.present?
|
35
35
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_contact_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anand Bait
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso_country_codes
|
@@ -124,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
|
-
|
128
|
-
rubygems_version: 2.5.1
|
127
|
+
rubygems_version: 3.2.7
|
129
128
|
signing_key:
|
130
129
|
specification_version: 4
|
131
130
|
summary: Phone, mobile, fax numbers with ISD code storage and validation.
|