aboutsummaryrefslogtreecommitdiffstats
path: root/guides/code/getting_started/app/models/post.rb
blob: 21387340b0acc6faacee06cf7d686f8182e3fa15 (plain) (blame)
1
2
3
4
5
6
class Post < ActiveRecord::Base
  validates :title, :presence => true,
                    :length => { :minimum => 5 }

  has_many :comments, :dependent => :destroy
end