Don't record 127.0.0.1 in the database as a host.

If you really want to record localhost, call it 127.0.0.2 or something.



git-svn-id: file:///home/svn/framework3/trunk@8856 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2010-03-20 14:38:50 +00:00
parent 1678a0f74a
commit e3355656ee
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ class Host < ActiveRecord::Base
has_many :service_notes, :through => :services
validates_exclusion_of :address, :in => ['127.0.0.1']
validates_uniqueness_of :address, :scope => :workspace_id
end