wco_models 3.1.0.92 → 3.1.0.94
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdbf0222f27d2ad8ccf5fa71077e08fb9ec62eaf108e1e041ad29325740b6d99
|
4
|
+
data.tar.gz: 99a93f0cbb635bf0870da7cf9697373e25f7f5d176cdcee8a3ba812ebb7ece50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dc5d6e0641b7c41b06a0c989405a9727a12b922c7bf58b5cb782157b8b8a3866b3d79ca3cdfd6971553b8a31cee36e1d81b28e0de1fb169c95b01da5113a456
|
7
|
+
data.tar.gz: 4d561105091521f34bca2f62f9da1eb38c0418b2b087748833c0066f2e699e7b310498ff8e806b0ba73db732c10a07a324710b01df649003316fcf1fc69ddad5
|
@@ -8,7 +8,7 @@ class Wco::LeadsController < Wco::ApplicationController
|
|
8
8
|
params[:lead][:leadset] = nil if params[:lead][:leadset].blank?
|
9
9
|
|
10
10
|
@lead = Wco::Lead.new params[:lead].permit!
|
11
|
-
authorize! :
|
11
|
+
authorize! :create, @lead
|
12
12
|
if @lead.save
|
13
13
|
flash_notice 'ok'
|
14
14
|
else
|
@@ -17,6 +17,11 @@ class Wco::LeadsController < Wco::ApplicationController
|
|
17
17
|
redirect_to action: :index
|
18
18
|
end
|
19
19
|
|
20
|
+
def edit
|
21
|
+
authorize! :edit, Wco::Lead
|
22
|
+
@lead = Wco::Lead.find params[:id]
|
23
|
+
end
|
24
|
+
|
20
25
|
def index
|
21
26
|
authorize! :index, Wco::Lead
|
22
27
|
@leads = Wco::Lead.all
|
@@ -64,7 +69,17 @@ class Wco::LeadsController < Wco::ApplicationController
|
|
64
69
|
end
|
65
70
|
|
66
71
|
def update
|
67
|
-
params[:tags].delete ''
|
72
|
+
params[:lead][:tags].delete ''
|
73
|
+
params[:lead][:leadset] = nil if params[:lead][:leadset].blank?
|
74
|
+
|
75
|
+
@lead = Wco::Lead.new params[:lead].permit!
|
76
|
+
authorize! :update, @lead
|
77
|
+
if @lead.save
|
78
|
+
flash_notice 'ok'
|
79
|
+
else
|
80
|
+
flash_alert @lead
|
81
|
+
end
|
82
|
+
redirect_to action: :show, id: @lead.id
|
68
83
|
end
|
69
84
|
|
70
85
|
##
|
@@ -49,8 +49,9 @@ class WcoEmail::MessageStub
|
|
49
49
|
})
|
50
50
|
stub = self
|
51
51
|
|
52
|
-
raw
|
53
|
-
|
52
|
+
raw = @client.get_object( bucket: stub.bucket, key: stub.object_key ).body.read
|
53
|
+
raw = raw.encode('utf-8', invalid: :replace, undef: :replace, replace: '_' )
|
54
|
+
the_mail = Mail.new( raw )
|
54
55
|
|
55
56
|
message_id = the_mail.header['message-id']&.decoded
|
56
57
|
message_id ||= "#{the_mail.date&.iso8601}::#{the_mail.from}"
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
.field
|
21
21
|
= f.label "Leadset (company)"
|
22
|
-
= f.select :leadset, options_for_select(@leadsets_list, selected: lead.leadset_id), { class: :select2 }
|
22
|
+
= f.select :leadset, options_for_select(@leadsets_list, selected: lead.leadset_id), {}, { class: :select2 }
|
23
23
|
|
24
24
|
-# .field
|
25
25
|
-# %label Rating
|