module-and-template-store/app/models/template.rb

15 lines
339 B
Ruby

class Template
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
field :title, type: String
field :author, type: String
field :preview, type: String
field :template, type: String
slug :title, history: true
mount_uploader :preview, ImageUploader
mount_uploader :template, ProductUploader
end