Skip to content

Commit 53ebfeb

Browse files
author
Jonathan Tapia
committed
Fix autoload issue on Solidus v3.1.0
1 parent bfbf616 commit 53ebfeb

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

app/models/spree/user.rb

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,12 @@
33
module Spree
44
class User < Spree::Base
55
include UserMethods
6+
include Spree::SoftDeletable
67

78
devise :database_authenticatable, :registerable, :recoverable,
89
:rememberable, :trackable, :validatable, :encryptable
910
devise :confirmable if Spree::Auth::Config[:confirmable]
1011

11-
if defined?(Spree::SoftDeletable)
12-
include Spree::SoftDeletable
13-
else
14-
acts_as_paranoid
15-
include Spree::ParanoiaDeprecations
16-
17-
include Discard::Model
18-
self.discard_column = :deleted_at
19-
end
20-
2112
after_destroy :scramble_email_and_password
2213
after_discard :scramble_email_and_password
2314

spec/controllers/spree/user_registrations_controller_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
let(:password_confirmation) { 'foobar123' }
1414

1515
subject do
16-
post(:create, {
16+
post(:create,
1717
params: {
1818
spree_user: {
1919
2020
password: 'foobar123',
2121
password_confirmation: password_confirmation
2222
}
2323
}
24-
})
24+
)
2525
end
2626

2727
context 'when user created successfuly' do

spec/controllers/spree/user_sessions_controller_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
let(:password) { 'secret' }
1111

1212
subject do
13-
post(:create, {
13+
post(:create,
1414
params: {
1515
spree_user: {
1616
email: user.email,
1717
password: password
1818
},
1919
format: format
2020
}
21-
})
21+
)
2222
end
2323

2424
context "when using correct login information" do

0 commit comments

Comments
 (0)