Class Series
In: app/models/series.rb
Parent: MultiDayEvent

MultiDayEvent with events on several, non-contiguous days

This class doesn‘t add any special behavior to MultiDayEvent, but it is convential to separate events like stage races from series like the Cross Crusade

Methods

Public Class methods

[Source]

    # File app/models/series.rb, line 8
 8:   def Series.find_all_by_year(year)
 9:     logger.debug("Series.find_all_by_year(year)")
10:     start_of_year = Date.new(year, 1, 1)
11:     end_of_year = Date.new(year, 12, 31)
12:     return Series.find(
13:       :all,
14:       :conditions => ["date >= ? and date <= ?", start_of_year, end_of_year],
15:       :order => "date"
16:     )
17:   end

[Validate]