e_paper/app/models/topic.rb

20 lines
344 B
Ruby
Raw Normal View History

2017-07-05 09:16:55 +00:00
class Topic
include Mongoid::Document
include Mongoid::Timestamps
include Slug
field :episode,as: :slug_title, localize: true
field :content, localize: true
2017-08-07 09:53:17 +00:00
field :description, localize: true
2017-07-05 09:16:55 +00:00
belongs_to :paper
mount_uploader :image, ImageUploader
def self.find_by_param(input)
self.find_by(uid: input)
end
end