devise-login-cookie 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ module DeviseLoginCookie
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def authenticate!
|
16
|
-
if fresh?(cookie) && validate(resource)
|
16
|
+
if fresh?(cookie) && resource && validate(resource)
|
17
17
|
success!(resource)
|
18
18
|
else
|
19
19
|
pass
|
@@ -33,7 +33,8 @@ module DeviseLoginCookie
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def resource
|
36
|
-
|
36
|
+
# returns nil when user is missing.
|
37
|
+
@resource ||= mapping.to.where(:id => cookie.id)
|
37
38
|
end
|
38
39
|
|
39
40
|
def pass
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Paul Annesley
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-20 00:00:00 +11:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|