Updated validations of map

to prevent 2 maps with the same sha1

refs #16
This commit is contained in:
2012-04-26 12:55:33 -04:00
parent 572369efe1
commit 9f9561dfcc

View File

@@ -25,7 +25,8 @@ class Map < ActiveRecord::Base
require 'digest/sha1'
validates_presence_of :map, :package, :build
validates_uniqueness_of :map
validates_presence_of :map, :build, :package
def self.save(p)
map = Map.new