Class: Droom::Calendar

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.for_selectionObject



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

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

Instance Method Details

#ensure_slugObject



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

def ensure_slug
  ensure_presence_and_uniqueness_of(:slug, name.parameterize)
end