#94 ✓resolved
Jeffrey Gelens

[PATCH] Add composite scope to validates_uniqueness

Reported by Jeffrey Gelens | December 13th, 2007 @ 02:15 AM

In order to let unique composite indexes (the patch I created earlier) to do their job it should be checked using a validation.


  add_index [:server_id, :name, :collected], :unique => true
  validates_uniqueness_of :server_id, :event => :save, :scope => [:name, :collected]

Of course later this validation should be generated automatically when creating the index.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket