Sha256: aa1a4dfb17dfd82fedd08daffdd64313952b6bff3dc1b0b59f6eebe042e61b48
Contents?: true
Size: 468 Bytes
Versions: 1
Compression:
Stored size: 468 Bytes
Contents
module SiteFramework # This model represent a **Domain**. Each domain # belongs to a [Site] model and may or may not # belongs to another **Domain** class Domain < ActiveRecord::Base belongs_to :site # Self relation belongs_to :parent, :class_name => self.class validates_associated :site validates :name, :presence => true, :format => { :with => /\A(?:[a-z0-9\-]+\.)+[a-z]{2,4}\z/i } validates_uniqueness_of :name end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
site_framework-0.3.0 | app/models/site_framework/domain.rb |