class Post < ActiveRecord::Base # Title validates_presence_of :title, :message => "You need a title, bro." validates_length_of :title, :minimum => 5 # View Count validates_presence_of :view_count validates_numericality_of :view_count # Order validates_numericality_of :order, :message => "Make that shit a number!", :allow_nil => true # User ID validates_numericality_of :user_id, :message => "User ID Must be a number." # Content validates_presence_of :content validates_length_of :content, :maximum => 140 end