Sha256: 6630b7d4a3f0677dd8f4a91239cff774f66565c78eb1ce38e68589454177d7d2

Contents?: true

Size: 299 Bytes

Versions: 1

Compression:

Stored size: 299 Bytes

Contents

Spree::Product.class_eval do

  # Add inactive products scope to the search scope
  add_search_scope :without_inactive do
    where("#{Spree::Product.table_name}.inactive = ?", false)
  end

  add_search_scope :with_inactive do
    where("#{Spree::Product.table_name}.inactive = ?", true)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_product_activator-1.0.0 app/models/spree/product_decorator.rb