Sha256: 65aad4a1016117f54e591854b693f471877da89a5fb7d1818d6a5ea86d301089
Contents?: true
Size: 500 Bytes
Versions: 1
Compression:
Stored size: 500 Bytes
Contents
class Eventable::OpeningPeriodlist attr_reader :event, :items delegate :id, :save, :to => :event def initialize(event) @event = event @items = event.opening_periods.all end def errors ActiveRecord::Errors.new(self) end def add_blank @items << @event.opening_periods.build end def items_attributes=(attr) @event.opening_periods_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/opening_periodlist.rb |