title: How can I use validations in Rails 3.1 to enforce composite uniqueness?
body: <p>I have a Customer model that belongs_to Brand. Customer has only name and identifier (a string) as attributes. I want to enforce the uniqueness of name and identifier only within a particular brand. How can I enforce that scoped uniqueness?</p>