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
# File 'app/finders/spree/variants/visible_finder.rb', line 4

def initialize(scope:, current_currency:)
  @scope = scope
  @current_currency = current_currency
end

Instance Method Details

#executeObject



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

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