domain.rb 137 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 class Domain < ActiveRecord::Base belongs_to :owner, :polymorphic => true validates_format_of :name, :with => /^(\w+\.)+\w+$/ end