contact_sync 1.3.0 → 1.4.0

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: 8dadaea4599c076a2b99da7bda45f1a316f819ce
4
- data.tar.gz: 24c07d9d43befd1bb739af451c81cf2fb3e36cf7
3
+ metadata.gz: c19a1bb9c8bd2a8e82e9c3c09f8f5d5718891fc2
4
+ data.tar.gz: a9d45d8546aa474d32458287d0c341821544b455
5
5
  SHA512:
6
- metadata.gz: 0d290c1e3d9b5c467d960291a7f91e30723545ca8b768605bde389941056ed6a89638b86740a7343f641e125158dbdfb61eda0f9234df7cd628d67336a08ded8
7
- data.tar.gz: 4ba78ab4b61d6f3b493ea3defa22de89ef726bb3d2fd077303a8f0b8a2f51bea65f623648098e9bb71d0c6f348caa68bdf749ffbb12c199ae1854f32dee9d066
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
- # def matched_contacts
119
- # matched_contacts = []
120
- # user_phones = []
121
- # user_emails = []
122
- # self.contacts.each do |con|
123
- # user_phones.concat con.phones
124
- # user_emails.concat con.emails
125
- # end
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)
@@ -1,3 +1,3 @@
1
1
  module ContactSync
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contact_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saad Masood