Sha256: 67208baeaf2adb3590858c5aa4e2aca79b07056325b484b4bbfb704944e0a1be

Contents?: true

Size: 426 Bytes

Versions: 9

Compression:

Stored size: 426 Bytes

Contents

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

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

  # 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

9 entries across 9 versions & 1 rubygems

Version Path
radiant-0.7.2 app/models/layout.rb
radiant-0.6.5.1 app/models/layout.rb
radiant-0.6.5 app/models/layout.rb
radiant-0.6.6 app/models/layout.rb
radiant-0.6.7 app/models/layout.rb
radiant-0.6.9 app/models/layout.rb
radiant-0.6.8 app/models/layout.rb
radiant-0.7.0 app/models/layout.rb
radiant-0.7.1 app/models/layout.rb