Class: Spree::Variants::VisibleOptionsPresenter

Inherits:
OptionsPresenter
  • Object
show all
Defined in:
app/presenters/spree/variants/visible_options_presenter.rb

Instance Method Summary collapse

Instance Method Details

#to_sentenceObject

override



5
6
7
8
9
10
11
# File 'app/presenters/spree/variants/visible_options_presenter.rb', line 5

def to_sentence
  options = variant.option_values.reject { |ov| ov.option_type.hidden? }
  options = sort_options(options)
  options = present_options(options)

  join_options(options)
end