2014-04-01 07:12:43 +00:00
|
|
|
class Bulletin
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
2014-04-03 03:18:02 +00:00
|
|
|
include Slug
|
2014-04-01 07:12:43 +00:00
|
|
|
|
|
|
|
field :title, type: String, localize: true
|
|
|
|
field :body, type: String, localize: true
|
|
|
|
field :uid, type: String
|
|
|
|
|
2014-04-03 03:18:02 +00:00
|
|
|
def generate_slug
|
|
|
|
self.generate_slug(self.title, self.uid)
|
|
|
|
end
|
2014-04-01 07:12:43 +00:00
|
|
|
|
|
|
|
def self.find_by_param(input)
|
|
|
|
self.find_by(uid: input)
|
|
|
|
end
|
|
|
|
end
|