Skip to content

Commit

Permalink
Remove deprecated with_variant_sku_cont product scope
Browse files Browse the repository at this point in the history
Please use with_kept_variant_sku_cont now.

Ref solidusio#4164
  • Loading branch information
kennyadsl committed Apr 19, 2023
1 parent dab97b2 commit cb91f28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion core/app/models/spree/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def find_or_build_master

self.allowed_ransackable_associations = %w[stores variants_including_master master variants]
self.allowed_ransackable_attributes = %w[name slug]
self.allowed_ransackable_scopes = %i[available with_discarded with_variant_sku_cont with_all_variant_sku_cont with_kept_variant_sku_cont]
self.allowed_ransackable_scopes = %i[available with_discarded with_all_variant_sku_cont with_kept_variant_sku_cont]

# @return [Boolean] true if there are any variants
def has_variants?
Expand Down
5 changes: 0 additions & 5 deletions core/app/models/spree/product/scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@ def self.with_kept_variant_sku_cont(sku)
where(subquery.arel.exists)
end

def self.with_variant_sku_cont(sku)
Spree::Deprecation.warn("use .with_kept_variant_sku_cont instead")
with_kept_variant_sku_cont(sku)
end

class << self
private

Expand Down

0 comments on commit cb91f28

Please sign in to comment.