Sha256: 8ec30dfb19d0b5fbccdd066f2e6e8eaeaade523970527a3789dcdeb7fa6cb4e9

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

class Wco::Leadset
  include Mongoid::Document
  include Mongoid::Timestamps
  store_in collection: 'wco_leadsets'

  field :company_url
  def domain; company_url; end
  validates :company_url, presence: true, uniqueness: true
  index({ company_url: 1 }, { name: 'company_url' })

  field :email
  index({ email: 1 }, { name: 'email' })
  validates :email, presence: true, uniqueness: true

  has_many :profiles,    class_name: 'Wco::Profile',           inverse_of: :leadset
  has_many :appliances,  class_name: 'WcoHosting::Appliance',  inverse_of: :leadset

  has_many :serverhosts, class_name: 'WcoHosting::Serverhost', inverse_of: :leadset
  def next_serverhost
    serverhosts.first
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ish_models-3.1.0.16 app/models/wco/leadset.rb
ish_models-3.1.0.15 lib/wco/leadset.rb