Skip to content

Commit

Permalink
Don't include Paranoia for handling soft-deletions
Browse files Browse the repository at this point in the history
We're replacing Paranoia with Discard as the only option for
soft-deleting records.
  • Loading branch information
cedum authored and kennyadsl committed Jan 29, 2021
1 parent dc813e6 commit 466251e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions core/app/models/concerns/spree/soft_deletable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ module SoftDeletable
extend ActiveSupport::Concern

included do
acts_as_paranoid
include Spree::ParanoiaDeprecations::InstanceMethods
extend Spree::ParanoiaDeprecations::ClassMethods

include Discard::Model
self.discard_column = :deleted_at

default_scope { kept }
end
end
end
5 changes: 0 additions & 5 deletions core/spec/models/spree/concerns/soft_deletable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
end
end

it 'includes Paranoia' do
expect(Post).to respond_to(:with_deleted)
expect(Post.new).to respond_to(:deleted?)
end

it 'includes Discard' do
expect(Post).to respond_to(:with_discarded)
expect(Post.new).to respond_to(:discarded?)
Expand Down

0 comments on commit 466251e

Please sign in to comment.