announcement-test/app/models/bulletin_feed.rb

11 lines
273 B
Ruby
Raw Normal View History

2015-07-08 10:11:25 +00:00
class BulletinFeed
include Mongoid::Document
include Mongoid::Timestamps
include Slug
field :title, as: :slug_title, type: String, localize: true
field :tag_ids, type: Array, default: []
2020-07-22 03:11:58 +00:00
before_save do
BulletinFeedCache.where(uid: self.uid).destroy
end
2015-07-08 10:11:25 +00:00
end