Sha256: 19d5180228860761558c7fc628e7a425fc9800e7c80d9c31e2fbbd8247b13a1a
Contents?: true
Size: 465 Bytes
Versions: 1
Compression:
Stored size: 465 Bytes
Contents
class Eventable::Pricelist attr_reader :event, :items delegate :id, :save, :to => :event def initialize(event) @event = event @items = event.prices.all end def errors ActiveRecord::Errors.new(self) end def add_blank @items << @event.prices.build end def items_attributes=(attr) @event.prices_attributes=(attr) end def update_attributes(attrs) attrs.each do |k,v| send "#{k}=", v end save end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dcs-eventable-0.0.8 | app/models/eventable/pricelist.rb |