Module: Stall::Models::LineItem

Extended by:
ActiveSupport::Concern
Included in:
LineItem
Defined in:
app/models/stall/models/line_item.rb

Instance Method Summary collapse

Instance Method Details

#currencyObject



41
42
43
# File 'app/models/stall/models/line_item.rb', line 41

def currency
  product_list.try(:currency) || Money.default_currency
end

#like?(other) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
38
39
# File 'app/models/stall/models/line_item.rb', line 35

def like?(other)
  [:sellable_id, :sellable_type].all? do |property|
    public_send(property) == other.public_send(property)
  end
end