announcement-test/app/models/bulletin.rb

15 lines
334 B
Ruby

class Bulletin
include Mongoid::Document
include Mongoid::Timestamps
include OrbitCategory::Categorizable
include Slug
field :title, as: :slug_title, type: String, localize: true
field :body, type: String, localize: true
field :uid, type: String
def self.find_by_param(input)
self.find_by(uid: input)
end
end