Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Spree::SoftDeletable on users model #223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions app/models/spree/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,12 @@
module Spree
class User < Spree::Base
include UserMethods
include Spree::SoftDeletable

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

if defined?(Spree::SoftDeletable)
include Spree::SoftDeletable
else
acts_as_paranoid
include Spree::ParanoiaDeprecations

include Discard::Model
self.discard_column = :deleted_at
end

after_destroy :scramble_email_and_password
after_discard :scramble_email_and_password

Expand Down