Sha256: 348cde542764af1c2e1f7c1d726518bdea9e8bdab874bcaf6864e770facf17d1

Contents?: true

Size: 611 Bytes

Versions: 13

Compression:

Stored size: 611 Bytes

Contents

class WcoHosting::Domain
  include Mongoid::Document
  include Mongoid::Timestamps
  store_in collection: 'wco_dns_domains'

  field :name
  validates :name, presence: true, uniqueness: true

  ## orbital.city         : Z0145070C3DD1OJWHTXJ
  ## oquaney-splicing.com : Z060228025Y0JHUA35GN5
  # field :route53_zone
  # validates :route53_zone, presence: true

  STATE_ACTIVE   = 'active'
  STATE_INACTIVE = 'inactive'
  STATES         = [ 'active', 'inactive' ]
  field :state, default: STATE_ACTIVE

  def self.list
    [[nil,nil]] + all.where({ state: STATE_ACTIVE }).map { |i| [i.name, i.name ] }
  end

end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
wco_models-3.1.0.37 app/models/wco_hosting/domain.rb
wco_models-3.1.0.36 app/models/wco_hosting/domain.rb
wco_models-3.1.0.35 app/models/wco_hosting/domain.rb
wco_models-3.1.0.34 app/models/wco_hosting/domain.rb
wco_models-3.1.0.33 app/models/wco_hosting/domain.rb
wco_models-3.1.0.32 app/models/wco_hosting/domain.rb
wco_models-3.1.0.31 app/models/wco_hosting/domain.rb
ish_models-3.1.0.29 app/models/wco_hosting/domain.rb
ish_models-3.1.0.28 app/models/wco_hosting/domain.rb
ish_models-3.1.0.27 app/models/wco_hosting/domain.rb
ish_models-3.1.0.26 app/models/wco_hosting/domain.rb
ish_models-3.1.0.25 app/models/wco_hosting/domain.rb
ish_models-3.1.0.24 app/models/wco_hosting/domain.rb