authentasaurus 0.5.10 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,9 +20,9 @@ module ActiveRecord::ActsAsAuthenticatableValidatable
|
|
|
20
20
|
|
|
21
21
|
module InstanceMethods
|
|
22
22
|
private
|
|
23
|
-
def
|
|
23
|
+
def send_validation
|
|
24
24
|
unless self.active
|
|
25
|
-
validation =
|
|
25
|
+
validation = self.build_validation(:email => self.email, :validation_code => User.encrypt_password(self.username,self.password_seed))
|
|
26
26
|
unless validation.save
|
|
27
27
|
raise "Could not create validation record"
|
|
28
28
|
end
|
|
@@ -44,7 +44,7 @@ module ActiveRecord::Authenticatable
|
|
|
44
44
|
#validation
|
|
45
45
|
if args.include?(:validatable)
|
|
46
46
|
has_one :validation, :as => :user
|
|
47
|
-
|
|
47
|
+
after_create :send_validation
|
|
48
48
|
# include authentication methods including validation
|
|
49
49
|
include ActiveRecord::ActsAsAuthenticatableValidatable
|
|
50
50
|
else
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: authentasaurus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 29
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 5
|
|
9
|
-
-
|
|
10
|
-
version: 0.5.
|
|
9
|
+
- 11
|
|
10
|
+
version: 0.5.11
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Omar Mekky
|
|
@@ -18,7 +18,7 @@ autorequire:
|
|
|
18
18
|
bindir: bin
|
|
19
19
|
cert_chain: []
|
|
20
20
|
|
|
21
|
-
date: 2010-08-
|
|
21
|
+
date: 2010-08-10 00:00:00 +03:00
|
|
22
22
|
default_executable:
|
|
23
23
|
dependencies: []
|
|
24
24
|
|