ishapi 0.1.8.292 → 0.1.8.294
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb5a51286eeecf1dee4e39e0d2d44036c5742b3882da47f40c63499af4665c0a
|
4
|
+
data.tar.gz: cbd4c3e159da811dd7a1934500631fe6520cc2e514f32772587bb0a3d76bb106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c4841782096b5057b2b6ecba91b06de8309104847149f473654ed3b009c0bd19b2eee54b0c5104f92c090a57bbe4cbd1f04f6461580dc1313707df2220a8f8
|
7
|
+
data.tar.gz: 5a45e7c3183bb1a26b0c9716c99841ee479bc2b832565c4ae6008046b9d1416f74c09c4cda26ca81bf6fed359f3a7279369e19d8d29b4b9ea0bcc13cd2a42847
|
@@ -116,5 +116,26 @@ class ::Ishapi::ApplicationController < ActionController::Base
|
|
116
116
|
@current_ability ||= Ishapi::Ability.new( @current_profile )
|
117
117
|
end
|
118
118
|
|
119
|
+
def flash_alert what
|
120
|
+
flash[:alert] ||= []
|
121
|
+
if String == what.class
|
122
|
+
str = what
|
123
|
+
else
|
124
|
+
str = "Cannot create/update #{what.class.name}: #{what.errors.full_messages.join(', ')} ."
|
125
|
+
end
|
126
|
+
flash[:alert] << str
|
127
|
+
end
|
128
|
+
|
129
|
+
def flash_notice what
|
130
|
+
flash[:notice] ||= []
|
131
|
+
if String == what.class
|
132
|
+
str = what
|
133
|
+
else
|
134
|
+
str = "Created/updated #{what.class.name} ."
|
135
|
+
end
|
136
|
+
flash[:notice] << str
|
137
|
+
end
|
138
|
+
|
139
|
+
|
119
140
|
end
|
120
141
|
|
@@ -20,9 +20,15 @@ module ::Ishapi
|
|
20
20
|
template_id: params[:template_id],
|
21
21
|
campaign_id: params[:campaign_id],
|
22
22
|
})
|
23
|
-
@unsubscribe.update_attributes({
|
23
|
+
flag = @unsubscribe.update_attributes({
|
24
24
|
unsubscribed_at: Time.now,
|
25
25
|
})
|
26
|
+
if flag
|
27
|
+
flash_notice "You have been unsubscribed."
|
28
|
+
else
|
29
|
+
flash_alert "We're sorry, but something went wrong. Please try again later."
|
30
|
+
end
|
31
|
+
|
26
32
|
end
|
27
33
|
end
|
28
34
|
|
@@ -202,7 +202,9 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
202
202
|
|
203
203
|
# || MiaTagger.analyze( @message.part_html, :is_spammy_recruite ).score > .5
|
204
204
|
|
205
|
-
|
205
|
+
# puts! "applying filter #{filter} to conv #{conv}" if DEBUG
|
206
|
+
|
207
|
+
@message.apply_filter( filter )
|
206
208
|
end
|
207
209
|
end
|
208
210
|
|