publication/app/models/journal.rb

19 lines
456 B
Ruby

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