Sha256: 7a3410aa29d73df6a3590281a7be31d6f67f00fbd41831bd0d3c3fcbb67d0cb8

Contents?: true

Size: 486 Bytes

Versions: 5

Compression:

Stored size: 486 Bytes

Contents

class Layout < ActiveRecord::Base
  
  # Default Order
  order_by 'name'

  # Associations
  has_many :pages
  belongs_to :created_by, :class_name => 'User', :foreign_key => 'created_by'
  belongs_to :updated_by, :class_name => 'User', :foreign_key => 'updated_by'

  # Validations
  validates_presence_of :name, :message => 'required'
  validates_uniqueness_of :name, :message => 'name already in use'
  validates_length_of :name, :maximum => 100, :message => '%d-character limit'

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
radiant-0.6.1 app/models/layout.rb
radiant-0.6.0 app/models/layout.rb
radiant-0.6.3 app/models/layout.rb
radiant-0.6.2 app/models/layout.rb
radiant-0.6.4 app/models/layout.rb