contact_sync 1.3.0 → 1.4.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 +4 -4
- data/lib/contact_sync/syncable.rb +8 -23
- data/lib/contact_sync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c19a1bb9c8bd2a8e82e9c3c09f8f5d5718891fc2
|
4
|
+
data.tar.gz: a9d45d8546aa474d32458287d0c341821544b455
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bfc87a641c89c5868c137d65af6a4243ca43903a23bf7f11b50e7c494c484bbbf2de225d76ac3ff4edc8954dcee8f54e03015470a289d9b20dfbcf29c5eddb9
|
7
|
+
data.tar.gz: 253bb569a4a1338b2a4414e65317868be32e77a89b7c96a272d5ee283f9a4794573af0e7b168ac0a3f295e27927b14d44533c314c37d0471d5b83e1df189151c
|
@@ -115,29 +115,14 @@ module ContactSync
|
|
115
115
|
return matched_users
|
116
116
|
end
|
117
117
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
#
|
127
|
-
# user_phones.each do |phone|
|
128
|
-
# u = User.where(encrypted_number: phone.number.encrypt(:symmetric)).limit(1).first
|
129
|
-
# matched_contacts << u.id unless u.blank?
|
130
|
-
# end
|
131
|
-
# user_emails.each do |mail|
|
132
|
-
# u = User.where(email: mail.email).limit(1).first
|
133
|
-
# if !u.blank?
|
134
|
-
# matched_contacts << u.id
|
135
|
-
# end
|
136
|
-
# end
|
137
|
-
# other_contacts = self.contacts.collect(&:id) &
|
138
|
-
# return {app_users: matched_contacts, other_users: self.contacts}
|
139
|
-
# end
|
140
|
-
#
|
118
|
+
def remove_all_contacts
|
119
|
+
self.contacts.destroy_all
|
120
|
+
if self.contacts.count > 0
|
121
|
+
return false
|
122
|
+
end
|
123
|
+
return true
|
124
|
+
end
|
125
|
+
|
141
126
|
private
|
142
127
|
def contact_params(aContact)
|
143
128
|
aContact.permit(:composite_name, :first_name, :middle_name, :last_name, :prefix, :suffix, :nickname, :job_title, :department, :organization, :birthdate, :note, :creation_date, :modification_date, :record_id)
|
data/lib/contact_sync/version.rb
CHANGED