authem 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,9 +25,9 @@ module Authem::ControllerSupport
25
25
  def current_user
26
26
  @current_user ||= (
27
27
  if session[:user_id]
28
- Authem::Config.user_class.find(session[:user_id])
28
+ Authem::Config.user_class.where(id: session[:user_id]).first
29
29
  elsif cookies[:remember_me].present?
30
- user = Authem::Config.user_class.find(cookies.signed[:remember_me])
30
+ user = Authem::Config.user_class.where(id: cookies.signed[:remember_me]).first
31
31
  establish_presence(user) if user
32
32
  end
33
33
  )
@@ -11,7 +11,7 @@ module Authem::Model
11
11
  attr_protected :crypted_password, :salt, :reset_password_token
12
12
 
13
13
  validates_confirmation_of :password
14
- validate :email, :presence => true, :uniqueness => true
14
+ validates :email, :presence => true, :uniqueness => true
15
15
 
16
16
  def self.find_by_email(email)
17
17
  where("upper(email) = ?", email.upcase).first
@@ -1,3 +1,3 @@
1
1
  module Authem
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: authem
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paul Elliott
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-01-17 00:00:00 Z
13
+ date: 2012-02-01 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport