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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b3f4062d2509f470d0c88a16b2a435e0a8d18438
4
- data.tar.gz: fa332c183ee9292022524be0b939bd393eb38389
2
+ SHA256:
3
+ metadata.gz: 0d6f2ceda252bfaa8e201a00dab49eddbbb8d255dce3c0448e75714f88691611
4
+ data.tar.gz: e990269f749439e1f459cbe74a234bb78199b6506d7c07bbc49ea568ef7ce652
5
5
  SHA512:
6
- metadata.gz: e0fa191056be7dd2deeae8583b030d6d8291c606adb2a269feaa16170865f8c20077d4191154fa1ffa29de5a23ede78d4ca63f4b61182af27bb8e0b5db001866
7
- data.tar.gz: 8bafac5bb99ccd228ca22f01f24cac433bfca4e69892b8ceacd68bbfd4873b957cdd5607d2842e9c35fa9da0b9c958e71fff1d6b308e7a13338b3fe93878e7fc
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: '#{column}_without_isd_code.present?'
32
- validates :#{column}_without_isd_code, presence: true, if: '#{column}_isd_code.present?'
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
  }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module HasContactNumber
3
3
 
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
 
6
6
  end
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.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: 2016-04-09 00:00:00.000000000 Z
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
- rubyforge_project:
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.