Sha256: 2fbb44e42a55c0061a6785905f4488ce2cf5c3a5df9aa01379c9c234becdde73

Contents?: true

Size: 435 Bytes

Versions: 40

Compression:

Stored size: 435 Bytes

Contents

class WcoHosting::TaskTmpl
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Paranoia
  store_in collection: 'wco_task_tmpls'

  field :slug
  validates :slug, presence: true

  has_many :tasks, class_name: 'WcoHosting::Task'
  has_and_belongs_to_many :appliance_tmpls, class_name: 'WcoHosting::ApplianceTmpl'

  def to_s
    slug
  end
  def self.list
    [[nil,nil]] + all.map { |t| [t, t.id] }
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
wco_models-3.1.0.199 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.198 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.197 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.196 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.195 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.194 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.193 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.192 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.191 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.190 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.189 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.188 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.187 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.184 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.183 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.182 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.181 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.180 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.178 app/models/wco_hosting/task_tmpl.rb
wco_models-3.1.0.177 app/models/wco_hosting/task_tmpl.rb