22 lines
376 B
Ruby
22 lines
376 B
Ruby
|
class Topic
|
||
|
|
||
|
include Mongoid::Document
|
||
|
include Mongoid::Timestamps
|
||
|
|
||
|
include OrbitCategory::Categorizable
|
||
|
include OrbitTag::Taggable
|
||
|
include Slug
|
||
|
|
||
|
|
||
|
field :episode,as: :slug_title, localize: true
|
||
|
field :content, localize: true
|
||
|
|
||
|
belongs_to :paper
|
||
|
|
||
|
mount_uploader :image, ImageUploader
|
||
|
|
||
|
def self.find_by_param(input)
|
||
|
self.find_by(uid: input)
|
||
|
end
|
||
|
|
||
|
end
|