Sha256: b96dedea1dcad9accde16db8bc951c4578109be9d621392b1368356abf78ac1a

Contents?: true

Size: 550 Bytes

Versions: 64

Compression:

Stored size: 550 Bytes

Contents

module Caboose
	class PageTemplateCategory < ActiveRecord::Base
	  self.table_name = "page_template_categories"
	  has_many :page_templates, :foreign_key => "category_id"
	  attr_accessible :title, :description, :sort_order, :superadmin_only

	  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

	end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
caboose-cms-0.9.229 app/models/caboose/page_template_category.rb
caboose-cms-1.0.2 app/models/caboose/page_template_category.rb
caboose-cms-1.0.1 app/models/caboose/page_template_category.rb
caboose-cms-0.9.228 app/models/caboose/page_template_category.rb
caboose-cms-0.9.227 app/models/caboose/page_template_category.rb
caboose-cms-0.9.226 app/models/caboose/page_template_category.rb
caboose-cms-0.9.225 app/models/caboose/page_template_category.rb
caboose-cms-0.9.224 app/models/caboose/page_template_category.rb
caboose-cms-0.9.223 app/models/caboose/page_template_category.rb
caboose-cms-0.9.222 app/models/caboose/page_template_category.rb
caboose-cms-0.9.221 app/models/caboose/page_template_category.rb
caboose-cms-0.9.220 app/models/caboose/page_template_category.rb
caboose-cms-0.9.219 app/models/caboose/page_template_category.rb
caboose-cms-0.9.218 app/models/caboose/page_template_category.rb
caboose-cms-0.9.217 app/models/caboose/page_template_category.rb
caboose-cms-0.9.216 app/models/caboose/page_template_category.rb
caboose-cms-0.9.215 app/models/caboose/page_template_category.rb
caboose-cms-0.9.214 app/models/caboose/page_template_category.rb
caboose-cms-0.9.213 app/models/caboose/page_template_category.rb
caboose-cms-0.9.212 app/models/caboose/page_template_category.rb