authem 0.0.1 → 0.0.2
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/model.rb +1 -1
- data/lib/authem/version.rb +1 -1
- metadata +2 -2
@@ -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.
|
28
|
+
Authem::Config.user_class.where(id: session[:user_id]).first
|
29
29
|
elsif cookies[:remember_me].present?
|
30
|
-
user = Authem::Config.user_class.
|
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
|
)
|
data/lib/authem/model.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/authem/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: authem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
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
|
13
|
+
date: 2012-02-01 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|