contact_sync 1.2.0 → 1.2.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d0781f453be7d54f3779c149d146a8a879c1e98
|
4
|
+
data.tar.gz: b4239cab5b7cae346308696aaec17cc7a40651c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd436dc6f4dd4ae9e6aff18c4da45446ef75b944c6f6732f262fc3bf74cc03501ce1ce43976681b26cd1756f434626ba8b6069e0a5cf6f57daf3d0242cd0934c
|
7
|
+
data.tar.gz: fd2c45e3b28ccfcb816aa6105ede29021339f58dd85e4d7b11de32e60ca53a0abe1f91ce57994cf97faf3e5f023d3af3076bbe0bada0f2e7d368c62fca6145ec
|
data/lib/contact_sync/version.rb
CHANGED
@@ -6,6 +6,14 @@ class Phone < ActiveRecord::Base
|
|
6
6
|
return self.encrypted_number.try(:decrypt,:symmetric) || ""
|
7
7
|
end
|
8
8
|
|
9
|
+
def complete_phone_number
|
10
|
+
if self.cc_prefix.blank?
|
11
|
+
"0#{self.number}"
|
12
|
+
else
|
13
|
+
"+#{self.cc_prefix}#{self.number}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
9
17
|
def number=(string)
|
10
18
|
self.cc_prefix, num = string.extract_country_code
|
11
19
|
self.encrypted_number = num.encrypt(:symmetric)
|