announcement-test/app/models/bulletin.rb

17 lines
364 B
Ruby

class Bulletin
include Mongoid::Document
include Mongoid::Timestamps
include OrbitTag::Taggable
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