Class: Droom::Category
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Droom::Category
- Defined in:
- app/models/droom/category.rb
Class Method Summary collapse
-
.for_selection ⇒ Object
for_selection returns a set of [name, id] pairs suitable for use as select options.
Class Method Details
.for_selection ⇒ Object
for_selection returns a set of [name, id] pairs suitable for use as select options.
14 15 16 |
# File 'app/models/droom/category.rb', line 14 def self.for_selection self.all.map{|c| [c.name, c.id] } end |