Class: Droom::EventType
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Droom::EventType
- Includes:
- Concerns::Slugged
- Defined in:
- app/models/droom/event_type.rb
Class Method Summary collapse
Class Method Details
.default ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/models/droom/event_type.rb', line 15 def self.default default_type = self.where(:slug => "other_events").first_or_initialize if default_type.new_record? default_type.name = "Other Events" default_type.save end default_type end |
.for_selection ⇒ Object
11 12 13 |
# File 'app/models/droom/event_type.rb', line 11 def self.for_selection self.all.map {|et| [et.name, et.id]} end |