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.
@@ -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.url.xhr?
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
@@ -1,3 +1,3 @@
1
1
  module Authem
2
- VERSION = '1.0.0.rc2'
2
+ VERSION = '1.0.0.rc3'
3
3
  end
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.rc2
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-19 00:00:00.000000000 Z
12
+ date: 2012-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport