Sha256: f20cff846fa46a298df7d42cbbac809b7f2796ad949d0d1eefb36668ae198b94
Contents?: true
Size: 583 Bytes
Versions: 19
Compression:
Stored size: 583 Bytes
Contents
class Post include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paranoia include Mongoid::Slug field :title, type: String field :text, type: String field :source, type: String field :date, type: DateTime field :published, type: Boolean, default: true validates_presence_of :title validates_presence_of :date slug :title, history: true do |current_object| current_object.title.parameterize end scope :published, where(published: true) mount_uploader :image, Writer::ImageUploader end
Version data entries
19 entries across 19 versions & 2 rubygems