publication/app/models/journal.rb

19 lines
456 B
Ruby
Raw Normal View History

2018-10-04 02:47:23 +00:00
class Journal
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
mount_uploader :cover, ImageUploader
has_many :chapters, dependent: :destroy
end