created current scope in event_schedule model and conference info link name and path changed

This commit is contained in:
AnithaPal 2016-08-23 10:23:26 -04:00
parent e8d3177ec1
commit e82a3e1727
17 changed files with 53 additions and 65 deletions

View file

@ -12,6 +12,7 @@ class EventSchedule < ActiveRecord::Base
scope :confirmed, -> { joins(:event).where('state = ?', 'confirmed') }
scope :canceled, -> { joins(:event).where('state = ?', 'canceled') }
scope :withdrawn, -> { joins(:event).where('state = ?', 'withdrawn') }
scope :current, -> { where('start_time <= ?', Time.current).select{ |es| es.end_time >= Time.current }}
delegate :guid, to: :room, prefix: true