I created a simple blog application and wanted to enforce a rule that every post must have a title. In my post.rb file I have this code
class Post < ActiveRecord::Base
attr_accessible :body, :title
validates_presence_of :body, :title
When I update my post and delete my title I do not receive an error.