2013-12-25 10:39:05 +00:00
|
|
|
class Template
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
2013-12-26 09:49:49 +00:00
|
|
|
include Mongoid::Slug
|
2013-12-25 10:39:05 +00:00
|
|
|
|
|
|
|
field :title, type: String
|
|
|
|
field :author, type: String
|
2013-12-26 09:49:49 +00:00
|
|
|
field :preview, type: String
|
|
|
|
field :template, type: String
|
|
|
|
slug :title, history: true
|
2013-12-25 10:39:05 +00:00
|
|
|
|
|
|
|
mount_uploader :preview, ImageUploader
|
|
|
|
mount_uploader :template, ProductUploader
|
|
|
|
end
|