publication/app/models/publication.rb

20 lines
501 B
Ruby

class Publication
include Mongoid::Document
include Mongoid::Timestamps
include OrbitModel::Status
include OrbitTag::Taggable
include OrbitCategory::Categorizable
include Slug
field :title, type: String, localize: true
field :pub_date, type: DateTime
field :author, type: String, localize: true
field :author_description, type: String, localize: true
field :pub_information, localize: true
mount_uploader :cover, ImageUploader
has_many :chapters, dependent: :destroy
end