Class: Spree::Variants::VisibleFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/spree/variants/visible_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(scope:, current_currency:) ⇒ VisibleFinder

Returns a new instance of VisibleFinder.



4
5
6
7
8
# File 'app/finders/spree/variants/visible_finder.rb', line 4

def initialize(scope:, current_currency:)
  Spree::Deprecation.warn('Spree::Variants::VisibleFinder is deprecated and will be removed in Spree 5.5.')
  @scope = scope
  @current_currency = current_currency
end

Instance Method Details

#executeObject



10
11
12
# File 'app/finders/spree/variants/visible_finder.rb', line 10

def execute
  Spree::Variant.where(id: active_variants).joins(:option_values).order('spree_option_values.position ASC')
end