From 48c158feed5fd16b7939b33dcb53d270b0ea7784 Mon Sep 17 00:00:00 2001 From: Nicolae Claudius Date: Sat, 8 Oct 2011 02:04:27 -0700 Subject: [PATCH] fix #5 and #10 --- app/models/record.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/record.rb b/app/models/record.rb index f303c8d..9367e0b 100644 --- a/app/models/record.rb +++ b/app/models/record.rb @@ -6,7 +6,7 @@ class Record < ActiveRecord::Base validates :domain, :name, :presence => true validates :type, :inclusion => {:in => @@types, :message => "Unknown record type"} - validates :content, :uniqueness => {:scope => [:domain_id, :type]} + validates :content, :uniqueness => {:scope => [:domain_id, :type, :name]} # RFC 2181, 8 validates :ttl, :numericality => { # :greater_than_or_equal_to => 0,