Casecommons/schematic — Issue #2: validates uniqueness with scope
Author: pivotal-casebook
Created: 2011-10-20 14:07:05+00:00
State: open

validates uniqueness with scope should allow integers as the scope ; not only arrays

example

validates :allergy_id, uniqueness: { scope: :person_id }

wrapping the scope as an array makes it work

validates :allergy_id, uniqueness: { scope: [:person_id] }