usman 0.3.29 → 0.3.30
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/app/controllers/usman/api/v1/contacts_controller.rb +1 -6
- data/app/models/usman/contact.rb +1 -0
- data/lib/usman/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: a33182444e966fc4ebcedd4ce61d7100e9f9e584
|
4
|
+
data.tar.gz: aa1144b0de94877bddc97d7bbca5d4ca7af40ac9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 690e29b09a15ae51d0eb06926adbbee07edc67d2b1ba1eb8772ddd6e592f0a2344fade13713265cbd246797b191ed298f2539d3665c9c295563ca457c9c873af
|
7
|
+
data.tar.gz: f9d14b81a77015d3585164a46234923813f94b858cd04a9a3188a61a769582c9a2c2f7bfeee82c776a4f073b58f0c529712863311baf17534288a867875b9b3d
|
@@ -13,7 +13,6 @@ module Usman
|
|
13
13
|
message: I18n.translate("api.profile.user_does_not_exists.message")
|
14
14
|
}
|
15
15
|
else
|
16
|
-
|
17
16
|
contacts = []
|
18
17
|
params[:contacts].each do |cnt|
|
19
18
|
contact = Usman::Contact.new
|
@@ -101,11 +100,7 @@ module Usman
|
|
101
100
|
end
|
102
101
|
|
103
102
|
private
|
104
|
-
|
105
|
-
def permitted_params
|
106
|
-
params.permit(:name, :account_type, :email, :address, :contact_number)
|
107
|
-
end
|
108
|
-
|
103
|
+
|
109
104
|
end
|
110
105
|
end
|
111
106
|
end
|
data/app/models/usman/contact.rb
CHANGED
@@ -67,6 +67,7 @@ class Usman::Contact < Usman::ApplicationRecord
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def get_done_deal_user
|
70
|
+
return nil unless self.contact_number
|
70
71
|
formatted_number = parse_phone_number(self.contact_number)
|
71
72
|
reg = Registration.where("CONCAT_WS('', dialing_prefix, mobile_number) = ?", formatted_number).first
|
72
73
|
return reg && reg.user ? reg.user : nil
|
data/lib/usman/version.rb
CHANGED