Method: Spree::Product#empty_option_values?

Defined in:
app/models/spree/product.rb

#empty_option_values?Boolean

Returns true if there are no option values.

Returns:

  • (Boolean)

    true if there are no option values



234
235
236
# File 'app/models/spree/product.rb', line 234

def empty_option_values?
  options.empty? || !option_types.left_joins(:option_values).where('spree_option_values.id IS NULL').empty?
end