Validates uniqueness scope

In a Rails 2.x validation to check if the name of some model is unique
within a some category, I would use:

validates_uniqueness_of :name, :scope => :category_id

In Rails 3, this is replaced with:

validates :name, :uniqueness => true

However, I can’t seem to find a method of defining the uniqueness’
scope. Am I missing something?