announcement-test/app/models/bulletin.rb

15 lines
334 B
Ruby
Raw Normal View History

2014-04-01 07:12:43 +00:00
class Bulletin
include Mongoid::Document
include Mongoid::Timestamps
2014-04-10 09:52:43 +00:00
include OrbitCategory::Categorizable
2014-04-03 03:18:02 +00:00
include Slug
2014-04-01 07:12:43 +00:00
2014-04-11 09:20:07 +00:00
field :title, as: :slug_title, type: String, localize: true
2014-04-01 07:12:43 +00:00
field :body, type: String, localize: true
field :uid, type: String
def self.find_by_param(input)
self.find_by(uid: input)
end
end