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



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

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

#like?(other) ⇒ Boolean

Returns:

  • (Boolean)


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

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