Sha256: 4a03ecebc2cb22f56209599f8c326b7100558023e326949f6293621e2c8c51e4
Contents?: true
Size: 617 Bytes
Versions: 1
Compression:
Stored size: 617 Bytes
Contents
class Eventable::OpeningPeriod < ActiveRecord::Base set_table_name 'eventable_opening_periods' unloadable belongs_to :event, :class_name => 'Event', :foreign_key => :event_id has_many :opening_times, :class_name => 'Eventable::OpeningTime', :foreign_key => 'period_id', :dependent => :destroy accepts_nested_attributes_for :opening_times, :allow_destroy => true, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } attr_accessible :start_at, :end_at def opening_timelist Eventable::OpeningTimelist.new(self) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dcs-eventable-0.0.8 | app/models/eventable/opening_period.rb |