class Category < ActiveRecord::Base
  has_many  :events

  validates :name,
            :presence
end

class Category < ActiveRecord::Base
  has_many  :events

  validates :name,
            :presence => true
end

Complete syntax in validation for Category model
Complete syntax in validation for Category model
