Skip to content

Commit

Permalink
Remove paranoia deprecations
Browse files Browse the repository at this point in the history
Cleanup paranoia related deprecated methods and code comments.
  • Loading branch information
cedum committed Mar 27, 2020
1 parent e64acf1 commit 7310037
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 57 deletions.
2 changes: 1 addition & 1 deletion core/app/models/concerns/spree/adjustment_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def deals_with_adjustments_for_deleted_source

# The following is deprecated. As source_type without a source_id isn't
# much better than a source_id that doesn't exist. In Solidus itself the
# relevant classes use `acts_as_paranoid` so it is useful to keep the
# relevant classes use `discard` so it is useful to keep the
# source_id around.
adjustments.
joins(:order).
Expand Down
4 changes: 0 additions & 4 deletions core/app/models/spree/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ module Spree
# variations, called variants. Product properties include description,
# permalink, availability, shipping category, etc. that do not change by
# variant.
#
# @note this model uses {https://github.com/radar/paranoia paranoia}.
# +#destroy+ will only soft-destroy records and the default scope hides
# soft-destroyed records using +WHERE deleted_at IS NULL+.
class Product < Spree::Base
extend FriendlyId
friendly_id :slug_candidates, use: :history
Expand Down
1 change: 0 additions & 1 deletion core/lib/spree/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
require 'state_machines-activerecord'

require 'spree/deprecation'
require 'spree/paranoia_deprecations'

# This is required because ActiveModel::Validations#invalid? conflicts with the
# invalid state of a Payment. In the future this should be removed.
Expand Down
41 changes: 0 additions & 41 deletions core/lib/spree/paranoia_deprecations.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,4 @@
subject { action.discard }
it_should_behave_like "destroying adjustments from incomplete orders"
end

context "#paranoia_destroy" do
subject { Spree::Deprecation.silence { action.paranoia_destroy } }
it_should_behave_like "destroying adjustments from incomplete orders"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,5 @@ module Spree
subject { action.discard }
it_should_behave_like "destroying adjustments from incomplete orders"
end

describe "#paranoia_destroy" do
subject { Spree::Deprecation.silence { action.paranoia_destroy } }
it_should_behave_like "destroying adjustments from incomplete orders"
end
end
end

0 comments on commit 7310037

Please sign in to comment.