Sha256: 594ac2a89d66d315789166d0ed0e1b8cd950f665a492d526e2348e85bed9e2a1

Contents?: true

Size: 585 Bytes

Versions: 29

Compression:

Stored size: 585 Bytes

Contents

class WcoHosting::Environment
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Paranoia
  include Wco::Utils
  store_in collection: 'wco_environments'

  belongs_to :leadset,      class_name: 'Wco::Leadset', inverse_of: :environments

  field :name
  validates :name, presence: true, uniqueness: true
  index({ name: -1 }, { unique: true })

  has_many :appliances, class_name: 'WcoHosting::Appliance', inverse_of: :environments

  ## variable @env in execution environments
  field :env_json, type: Object, default: '{}'


  def to_s
    name
  end
end


Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
wco_models-3.1.0.165 app/models/wco_hosting/environment.rb
wco_models-3.1.0.164 app/models/wco_hosting/environment.rb
wco_models-3.1.0.163 app/models/wco_hosting/environment.rb
wco_models-3.1.0.162 app/models/wco_hosting/environment.rb
wco_models-3.1.0.161 app/models/wco_hosting/environment.rb
wco_models-3.1.0.155 app/models/wco_hosting/environment.rb
wco_models-3.1.0.154 app/models/wco_hosting/environment.rb
wco_models-3.1.0.153 app/models/wco_hosting/environment.rb
wco_models-3.1.0.152 app/models/wco_hosting/environment.rb