Sha256: 6ef274014accef2ae7b30bacb7b054171d84d522a7ef348f13b17148481bd6c5
Contents?: true
Size: 664 Bytes
Versions: 47
Compression:
Stored size: 664 Bytes
Contents
class FestivityPerformance < ActiveRecord::Base validates_presence_of :event_page_id belongs_to :festivity_event_page, foreign_key: :event_page_id belongs_to :festivity_location_page, foreign_key: :location_page_id default_scope {order :start_date} attr_accessible :start_date, :end_date, :festivity_location_page, :notes def start_date=(date) super(parse_date(date)) end def end_date=(date) super(parse_date(date)) end def festivity_location_page=(location) super(FestivityLocationPage.find(location[:id])) unless location[:id].blank? end private def parse_date(date) Chronic.parse(date) rescue nil end end
Version data entries
47 entries across 47 versions & 1 rubygems