Browse Source

fix #5 and #10

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
48c158feed
  1. 2
      app/models/record.rb

2
app/models/record.rb

@ -6,7 +6,7 @@ class Record < ActiveRecord::Base
validates :domain, :name, :presence => true validates :domain, :name, :presence => true
validates :type, :inclusion => {:in => @@types, :message => "Unknown record type"} 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 # RFC 2181, 8
validates :ttl, :numericality => { validates :ttl, :numericality => {
# :greater_than_or_equal_to => 0, # :greater_than_or_equal_to => 0,

Loading…
Cancel
Save