Sha256: 0b7cddd943a89bf102e2760b9bbca2a9638e7a02f463f9d4132559bec7b0dbd0

Contents?: true

Size: 407 Bytes

Versions: 9

Compression:

Stored size: 407 Bytes

Contents

class VirtualDomain < ActiveRecord::Base

  has_many :virtual_users
  has_many :virtual_aliases
  has_and_belongs_to_many :admin_users, :join_table => :users_domains

  attr_accessible :name

  validates :name,
    :presence   => true, :uniqueness => true,
    :format     => { :with => /\A(?:[-a-z0-9]+\.)+[a-z]{2,}\Z/i }

  default_scope order('id DESC').includes([:virtual_users, :virtual_aliases])

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rmails-0.2.2 app/models/virtual_domain.rb
rmails-0.2.1 app/models/virtual_domain.rb
rmails-0.2.0 app/models/virtual_domain.rb
rmails-0.1.6 app/models/virtual_domain.rb
rmails-0.1.5 app/models/virtual_domain.rb
rmails-0.1.4 app/models/virtual_domain.rb
rmails-0.1.3 app/models/virtual_domain.rb
rmails-0.1.2 app/models/virtual_domain.rb
rmails-0.1.1 app/models/virtual_domain.rb