Sha256: 72ad4425b776d34c5e1eab2c701d6b7cf1a0fb378065ac495a48c85520ea2aae
Contents?: true
Size: 515 Bytes
Versions: 1
Compression:
Stored size: 515 Bytes
Contents
class Article include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paranoia include Mongoid::Versioning field :title field :content field :published, :type => Boolean, :default => false field :allow_comments, :type => Boolean, :default => true embeds_many :comments embeds_one :permalink referenced_in :author, :class_name => 'User', :inverse_of => :articles validates :title, :presence => true validates_length_of :title, :minimum => 8, :maximum => 16 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-rspec-1.4.4 | spec/models/article.rb |