devise-onesignal 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -3
- data/lib/devise-onesignal/device_concern.rb +4 -4
- data/lib/devise-onesignal/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62af876a85b3e16d953ca16eaf0194d46df5c6074f4e24d341bf6218b4f7b530
|
4
|
+
data.tar.gz: 0cbd80c7c9adc79d7780afa5b4b698e547b71db3fc3508c6b6ed6e8b4d67461e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d61e40560c478c6f4eb239941df0d47e60304c0ac973e89a33cf942a1cdca0ddf50dfd8b928b69e6c6cfc13e2214a43fec7eb58ca235e7f01a3041863f45a590
|
7
|
+
data.tar.gz: dfd5c988cba7eb4cadf67594ff58abf8d5f0716b1e03163f18d175c0c5cf265a7db66ab16cfb9a138dc26022e2510bda8a367d1552e9fc6d3464083212045631
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -85,11 +85,9 @@ document.addEventListener( 'turbolinks:load', function() {
|
|
85
85
|
|
86
86
|
You most likely want to associate your devise object (e.g. `current_user`) with your OneSignal integration. Now, if your Devise model is called `User` and the `current_user` method is available you don't have to worry about that.
|
87
87
|
|
88
|
-
Let's say our Devise model is named `Admin`. Just add a
|
88
|
+
Let's say our Devise model is named `Admin`. Just add a method to your `ApplicationController`:
|
89
89
|
|
90
90
|
```ruby
|
91
|
-
protected
|
92
|
-
|
93
91
|
def set_device_owner
|
94
92
|
current_admin if current_admin
|
95
93
|
end
|
@@ -9,6 +9,10 @@ module DeviseOnesignal
|
|
9
9
|
before_action :set_device
|
10
10
|
end
|
11
11
|
|
12
|
+
def set_device_owner
|
13
|
+
current_user if current_user
|
14
|
+
end
|
15
|
+
|
12
16
|
private
|
13
17
|
|
14
18
|
def set_device
|
@@ -22,9 +26,5 @@ module DeviseOnesignal
|
|
22
26
|
end
|
23
27
|
end
|
24
28
|
|
25
|
-
def set_device_owner
|
26
|
-
super || current_user if current_user
|
27
|
-
end
|
28
|
-
|
29
29
|
end
|
30
30
|
end
|