Sha256: 46f1273de0b5727125348916fe53d226bdd9f27cad48663056a775fa9cc88817

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

class Wco::DnsDomain
  include Mongoid::Document
  include Mongoid::Timestamps

  field :name
  validates :name, 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

1 entries across 1 versions & 1 rubygems

Version Path
ish_models-3.0.0.1 lib/wco/dns_domain.rb