19 lines
389 B
Ruby
19 lines
389 B
Ruby
class Bulletin
|
|
include Mongoid::Document
|
|
include Mongoid::Timestamps
|
|
include OrbitCategory::Categorizable
|
|
include Slug
|
|
|
|
field :title, type: String, localize: true
|
|
field :body, type: String, localize: true
|
|
field :uid, type: String
|
|
|
|
def generate_slug
|
|
self.generate_slug(self.title, self.uid)
|
|
end
|
|
|
|
def self.find_by_param(input)
|
|
self.find_by(uid: input)
|
|
end
|
|
end
|