Class: Droom::Category

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

Class Method Summary collapse

Class Method Details

.for_selectionObject

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