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

Version Path
social_stream-0.10.3 events/app/models/session.rb
social_stream-events-0.0.7 app/models/session.rb
social_stream-0.10.2 events/app/models/session.rb
social_stream-events-0.0.6 app/models/session.rb
social_stream-0.10.1 events/app/models/session.rb
social_stream-events-0.0.5 app/models/session.rb
social_stream-0.10.0 events/app/models/session.rb
social_stream-events-0.0.4 app/models/session.rb
social_stream-0.9.7 events/app/models/session.rb
social_stream-0.9.6 events/app/models/session.rb
social_stream-0.9.5 events/app/models/session.rb
social_stream-0.9.4 events/app/models/session.rb
social_stream-0.9.3 events/app/models/session.rb
social_stream-0.9.2 events/app/models/session.rb
social_stream-events-0.0.2 app/models/session.rb
social_stream-events-0.0.1 app/models/session.rb