Class: Droom::Calendar

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Droom::Concerns::Slugged
Defined in:
app/models/droom/calendar.rb

Class Method Summary collapse

Class Method Details

.default_calendarObject



15
16
17
# File 'app/models/droom/calendar.rb', line 15

def self.default_calendar
  where(:name => "main").first_or_create
end

.for_selectionObject



11
12
13
# File 'app/models/droom/calendar.rb', line 11

def self.for_selection
  self.all.map{|c| [c.name, c.id] }
end

.stream_calendarObject



19
20
21
# File 'app/models/droom/calendar.rb', line 19

def self.stream_calendar
  where(:name => "stream").first_or_create
end