spree_auth 0.70.3 → 0.70.4
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.
- data/app/controllers/user_passwords_controller.rb +11 -0
- data/app/models/user.rb +1 -1
- metadata +7 -7
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
class UserPasswordsController < Devise::PasswordsController
|
|
2
2
|
include SpreeBase
|
|
3
3
|
helper :users, 'spree/base'
|
|
4
|
+
|
|
5
|
+
after_filter :associate_user, :only => :update
|
|
4
6
|
|
|
5
7
|
def new
|
|
6
8
|
super
|
|
@@ -32,4 +34,13 @@ class UserPasswordsController < Devise::PasswordsController
|
|
|
32
34
|
def update
|
|
33
35
|
super
|
|
34
36
|
end
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
def associate_user
|
|
41
|
+
return unless current_user and current_order
|
|
42
|
+
current_order.associate_user!(current_user)
|
|
43
|
+
session[:guest_token] = nil
|
|
44
|
+
end
|
|
45
|
+
|
|
35
46
|
end
|
data/app/models/user.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 271
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 70
|
|
9
|
-
-
|
|
10
|
-
version: 0.70.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.70.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Sean Schofield
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date:
|
|
18
|
+
date: 2012-03-04 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
|
@@ -23,12 +23,12 @@ dependencies:
|
|
|
23
23
|
requirements:
|
|
24
24
|
- - "="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
hash:
|
|
26
|
+
hash: 271
|
|
27
27
|
segments:
|
|
28
28
|
- 0
|
|
29
29
|
- 70
|
|
30
|
-
-
|
|
31
|
-
version: 0.70.
|
|
30
|
+
- 4
|
|
31
|
+
version: 0.70.4
|
|
32
32
|
requirement: *id001
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|