Sha256: fe1dc1f998cb5499191ad790c2930c24534338c6297dff6e5bb1d8e2d1af23b8
Contents?: true
Size: 186 Bytes
Versions: 10
Compression:
Stored size: 186 Bytes
Contents
class Basket < ActiveRecord::Base has_and_belongs_to_many :items has_many :payments def price items.inject(0) do |total, item| total + item.price end end end
Version data entries
10 entries across 5 versions & 2 rubygems