seminar2/custom_announcement/app/models/custom_bulletin_feed.rb

11 lines
285 B
Ruby

class CustomBulletinFeed
include Mongoid::Document
include Mongoid::Timestamps
include Slug
field :title, as: :slug_title, type: String, localize: true
field :tag_ids, type: Array, default: []
before_save do
CustomBulletinFeedCache.where(uid: self.uid).destroy
end
end