Class: Caboose::PageTemplateCategory

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/caboose/page_template_category.rb

Class Method Summary collapse

Class Method Details

.all_options(blank) ⇒ Object


7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/caboose/page_template_category.rb', line 7

def self.all_options(blank)
   if blank
     options = [{'value' => '','text' => ''}]
   else
     options = []
   end
   PageTemplateCategory.order(:title).all.each do |s|
     options << { 'value' => s.id, 'text' => s.title }
   end
   return options.to_json
end