Sha256: 1439061e9f09288c40f9c826239cd5c30f8fa4eceaa944f3d4531e0f66162b37

Contents?: true

Size: 526 Bytes

Versions: 65

Compression:

Stored size: 526 Bytes

Contents

require "cfoundry/v2/model"

module CFoundry::V2
  class Domain < Model
    validates_presence_of :name
    validates_format_of :name, :with => /\A([^\.]+\.)+[^\.]+\Z/
    validates_presence_of :owning_organization

    attribute :name, :string
    attribute :wildcard, :boolean
    to_one    :owning_organization, :as => :organization, :default => nil
    to_many   :spaces

    queryable_by :name, :owning_organization_guid, :space_guid

    def system?
      guid.present? && !owning_organization.present?
    end
  end
end

Version data entries

65 entries across 65 versions & 3 rubygems

Version Path
cfoundry-4.1.0 lib/cfoundry/v2/domain.rb
cfoundry-4.0.4.rc2 lib/cfoundry/v2/domain.rb
cfoundry-4.0.4.rc1 lib/cfoundry/v2/domain.rb
cfoundry-4.0.3 lib/cfoundry/v2/domain.rb
cfoundry-4.0.2.rc5 lib/cfoundry/v2/domain.rb
cfoundry-4.0.2.rc4 lib/cfoundry/v2/domain.rb
cfoundry-4.0.2.rc3 lib/cfoundry/v2/domain.rb
cfoundry-4.0.2.rc2 lib/cfoundry/v2/domain.rb
cfoundry-4.0.2.rc1 lib/cfoundry/v2/domain.rb
cfoundry-4.0.1 lib/cfoundry/v2/domain.rb
cfoundry-4.0.0 lib/cfoundry/v2/domain.rb
cfoundry-3.0.1 lib/cfoundry/v2/domain.rb
cfoundry-3.0.0 lib/cfoundry/v2/domain.rb
cfoundry-2.4.1.rc1 lib/cfoundry/v2/domain.rb
cfoundry-2.4.0 lib/cfoundry/v2/domain.rb
cfoundry-2.3.7.rc1 lib/cfoundry/v2/domain.rb
cfoundry-2.3.6 lib/cfoundry/v2/domain.rb
cfoundry-2.3.6.rc2 lib/cfoundry/v2/domain.rb
cfoundry-2.3.6.rc1 lib/cfoundry/v2/domain.rb
cfoundry-2.3.5 lib/cfoundry/v2/domain.rb