Sha256: 4fd414d5b18d4ef45549945d9ad4a3733cf352c4bad417b20da0ce02851c313a
Contents?: true
Size: 783 Bytes
Versions: 14
Compression:
Stored size: 783 Bytes
Contents
class Wco::Tag include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paranoia store_in collection: 'wco_tags' field :slug validates :slug, presence: true, uniqueness: true index({ slug: -1 }) # parent-child has_and_belongs_to_many :conversations, class_name: 'WcoEmail::Conversation' has_and_belongs_to_many :message_stubs, class_name: 'WcoEmail::MessageStub' has_and_belongs_to_many :headlines # , class_name: 'Headline' has_and_belongs_to_many :leads # , class_name: 'Lead' has_and_belongs_to_many :leadsets # , class_name: 'Leadset' has_and_belongs_to_many :reports has_and_belongs_to_many :logs INBOX = 'inbox' TRASH = 'trash' def self.list [[nil,nil]] + all.map { |p| [ p.slug, p.id ] } end end
Version data entries
14 entries across 14 versions & 1 rubygems