Module: Spree::DefaultPrice

Extended by:
ActiveSupport::Concern
Included in:
Variant
Defined in:
app/models/concerns/spree/default_price.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) find_or_build_default_price



14
15
16
# File 'app/models/concerns/spree/default_price.rb', line 14

def find_or_build_default_price
  default_price || build_default_price(Spree::Config.default_pricing_options.desired_attributes)
end

- (Boolean) has_default_price?

Returns:

  • (Boolean)


21
22
23
# File 'app/models/concerns/spree/default_price.rb', line 21

def has_default_price?
  !default_price.nil?
end