notifiable-rails 0.19.7 → 0.19.9
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d72a8ab45299096c3999b1f5b4636711f3abc436
|
4
|
+
data.tar.gz: a5c5d447002f2b6467142e0a26ee44e95f99033f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53bdb4ced5e11d073810bff0d408d69e7ef46ca0ae7c2fbc7295f48687d7a2eb3089aca448434680595e857862533d802907b8293cdbbe9786b0f9eec8fa1b34
|
7
|
+
data.tar.gz: 06bba839f81ee6e931fce417febaf9c55c63e87abba3fae279ab232b5fd05f43ac716d937fbe1aa821c6b781af3c9a3ac6cacb558da229557338376dce8c3989
|
@@ -10,9 +10,8 @@ module Notifiable
|
|
10
10
|
before_filter :find_device_token, :ensure_authorized!, :except => :create
|
11
11
|
|
12
12
|
def create
|
13
|
-
@device_token = DeviceToken.
|
14
|
-
@device_token =
|
15
|
-
|
13
|
+
@device_token = DeviceToken.find_or_initialize_by(:token => params[:token])
|
14
|
+
@device_token.is_valid = true
|
16
15
|
perform_update(device_token_params)
|
17
16
|
end
|
18
17
|
|
@@ -50,7 +49,7 @@ module Notifiable
|
|
50
49
|
end
|
51
50
|
|
52
51
|
def ensure_authorized!
|
53
|
-
head :status => :unauthorized if @device_token.user && !@device_token.user.eql?(current_notifiable_user)
|
52
|
+
head :status => :unauthorized if @device_token.user && current_notifiable_user && !@device_token.user.eql?(current_notifiable_user)
|
54
53
|
end
|
55
54
|
|
56
55
|
def find_device_token
|
data/lib/notifiable/engine.rb
CHANGED
data/lib/notifiable/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifiable-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Kocemba
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rspec-rails
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|