mailkick 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -1
- data/app/controllers/mailkick/subscriptions_controller.rb +13 -10
- data/app/helpers/mailkick/url_helper.rb +2 -2
- data/lib/mailkick/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: c525505d8fffda960f43cf7f5c85aaf205944a23
|
4
|
+
data.tar.gz: 14e99877ab0212660002d48d792ce0f6f82ae4df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a3c6a9d51ed34fee50fea39685bb49ad8d7ad944867b3b746683e46be1866349af57b6985d10295bee57d15bc321bb19d054258f8437e7cbd5edea999a1222b
|
7
|
+
data.tar.gz: 1b89dd17826de70c82947e41b9a2d7e85f4857e6c1496e9bc3c2ce9577b197957f35be4cafb25463b6f2042522b06f013dbbb7d9463b40a031c4c6a9ea88d1cf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -129,7 +129,7 @@ Mailkick.services = [
|
|
129
129
|
]
|
130
130
|
```
|
131
131
|
|
132
|
-
## Multiple Lists
|
132
|
+
## Multiple Lists [beta]
|
133
133
|
|
134
134
|
You may want to split your emails into multiple categories, like sale emails and order reminders.
|
135
135
|
|
@@ -177,6 +177,11 @@ More great gems for email
|
|
177
177
|
- [Roadie](https://github.com/Mange/roadie) - inline CSS
|
178
178
|
- [Letter Opener](https://github.com/ryanb/letter_opener) - preview email in development
|
179
179
|
|
180
|
+
## TODO
|
181
|
+
|
182
|
+
- Make it easy to customize controller
|
183
|
+
- Subscribe to events
|
184
|
+
|
180
185
|
## Reference
|
181
186
|
|
182
187
|
Change how the user is determined
|
@@ -6,12 +6,12 @@ module Mailkick
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def unsubscribe
|
9
|
-
Mailkick.opt_out(
|
9
|
+
Mailkick.opt_out(@options)
|
10
10
|
redirect_to subscription_path(params[:id])
|
11
11
|
end
|
12
12
|
|
13
13
|
def subscribe
|
14
|
-
Mailkick.opt_in(
|
14
|
+
Mailkick.opt_in(@options)
|
15
15
|
redirect_to subscription_path(params[:id])
|
16
16
|
end
|
17
17
|
|
@@ -25,25 +25,28 @@ module Mailkick
|
|
25
25
|
# on the unprobabilistic chance user_type is compromised, not much damage
|
26
26
|
@user = user_type.constantize.find(user_id)
|
27
27
|
end
|
28
|
-
@options = {
|
29
|
-
|
28
|
+
@options = {
|
29
|
+
email: @email,
|
30
|
+
user: @user,
|
31
|
+
list: @list
|
32
|
+
}
|
30
33
|
rescue ActiveSupport::MessageVerifier::InvalidSignature
|
31
34
|
render text: "Subscription not found", status: :bad_request
|
32
35
|
end
|
33
36
|
end
|
34
37
|
|
35
|
-
def opted_out?
|
36
|
-
Mailkick.opted_out?(@options
|
38
|
+
def opted_out?
|
39
|
+
Mailkick.opted_out?(@options)
|
37
40
|
end
|
38
41
|
helper_method :opted_out?
|
39
42
|
|
40
|
-
def subscribe_url
|
41
|
-
subscribe_subscription_path(params[:id]
|
43
|
+
def subscribe_url
|
44
|
+
subscribe_subscription_path(params[:id])
|
42
45
|
end
|
43
46
|
helper_method :subscribe_url
|
44
47
|
|
45
|
-
def unsubscribe_url
|
46
|
-
unsubscribe_subscription_path(params[:id]
|
48
|
+
def unsubscribe_url
|
49
|
+
unsubscribe_subscription_path(params[:id])
|
47
50
|
end
|
48
51
|
helper_method :unsubscribe_url
|
49
52
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Mailkick
|
2
2
|
module UrlHelper
|
3
3
|
|
4
|
-
def mailkick_unsubscribe_url
|
4
|
+
def mailkick_unsubscribe_url
|
5
5
|
Mailkick::Engine.routes.url_helpers.url_for(
|
6
|
-
Rails.application.config.action_mailer.default_url_options.merge(
|
6
|
+
Rails.application.config.action_mailer.default_url_options.merge(
|
7
7
|
controller: "mailkick/subscriptions",
|
8
8
|
action: "unsubscribe",
|
9
9
|
id: "{{MAILKICK_TOKEN}}"
|
data/lib/mailkick/version.rb
CHANGED