Sha256: 1026e077c45b5e86f51159b58f71be0cc259b792bc74e3a40d354201300d297f

Contents?: true

Size: 384 Bytes

Versions: 9

Compression:

Stored size: 384 Bytes

Contents

class PartType < ActiveRecord::Base

  # Default Order
  default_scope :order => 'name'

  # Associations
  has_many :template_parts
  
  # Validations
  validates_presence_of :name
  validates_uniqueness_of :name
  validates_inclusion_of :field_type, :identifier => :field_types, 
                         :in => %w{text_area text_field check_box radio_button hidden predefined}
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
radiant-templates-extension-1.0.8 app/models/part_type.rb
radiant-templates-extension-1.0.7 app/models/part_type.rb
radiant-templates-extension-1.0.6 app/models/part_type.rb
radiant-templates-extension-1.0.5 app/models/part_type.rb
radiant-templates-extension-1.0.4 app/models/part_type.rb
radiant-templates-extension-1.0.3 app/models/part_type.rb
radiant-templates-extension-1.0.2 app/models/part_type.rb
radiant-templates-extension-1.0.1 app/models/part_type.rb
radiant-templates-extension-1.0.0 app/models/part_type.rb