Class: Droom::Calendar
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Droom::Calendar
- Defined in:
- app/models/droom/calendar.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.for_selection ⇒ Object
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_slug ⇒ Object
14 15 16 |
# File 'app/models/droom/calendar.rb', line 14 def ensure_slug ensure_presence_and_uniqueness_of(:slug, name.parameterize) end |