Sha256: f719fd117e55ee84b52f56ae4240e39fad18617b384c47531ec4c34b1f44a5ff
Contents?: true
Size: 594 Bytes
Versions: 16
Compression:
Stored size: 594 Bytes
Contents
class Session < ActiveRecord::Base include SocialStream::Models::Object belongs_to :agenda has_one :event, :through => :agenda validates_presence_of :agenda_id acts_as_conference_manager_session def to_fullcalendar_json "{title: '#{name}', start: new Date(#{start_at.year},#{start_at.month-1},#{start_at.day},#{start_at.hour},#{start_at.min}),end: new Date(#{end_at.year},#{end_at.month-1},#{end_at.day},#{end_at.hour},#{end_at.min}),allDay: false}" end def sanitize_for_fullcalendar(string) string.gsub("\r","").gsub("\n","<br />").gsub(/["]/, '\'') end end
Version data entries
16 entries across 16 versions & 2 rubygems