authem 1.0.0.rc2 → 1.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/authem/controller_support.rb +2 -2
- data/lib/authem/version.rb +1 -1
- metadata +2 -2
@@ -15,7 +15,7 @@ module Authem::ControllerSupport
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def current_user
|
18
|
-
if session[:session_token]
|
18
|
+
@current_user ||= if session[:session_token]
|
19
19
|
Authem::Config.user_class.where(session_token: session[:session_token].to_s).first
|
20
20
|
elsif cookies[:remember_token].present?
|
21
21
|
Authem::Config.user_class.where(remember_token: cookies.signed[:remember_token].to_s).first.tap do |user|
|
@@ -26,7 +26,7 @@ module Authem::ControllerSupport
|
|
26
26
|
|
27
27
|
def require_user
|
28
28
|
unless current_user
|
29
|
-
session[:return_to_url] = request.url unless request.
|
29
|
+
session[:return_to_url] = request.url unless request.xhr?
|
30
30
|
redirect_to Authem::Config.sign_in_path
|
31
31
|
end
|
32
32
|
end
|
data/lib/authem/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|